add hide options for border

This commit is contained in:
speedie 2022-11-30 18:06:54 +01:00
parent 5f76b12596
commit 4e5ebf8ca1
4 changed files with 21 additions and 0 deletions

View file

@ -44,6 +44,8 @@ speedwm.client.automove: 1 ! Allow windows to move themselves on de
speedwm.client.autofocus: 1 ! Allow windows to focus themselves on demand. This may be annoying depending on what software you use and is disabled by default for this reason (0/1)
speedwm.client.autoresize: 1 ! Allow windows to resize themselves on demand (0/1)
speedwm.client.decorhints: 1 ! Respect decoration hints for windows (0/1)
speedwm.client.hide.border: 0 ! Hide all window borders for windows (0/1)
speedwm.client.hide.singleborder: 1 ! Hide the window border when only a single window is visible (0/1)
speedwm.client.fade.inactive: 1 ! Fade inactive windows (windows that are not focused) (0/1)
speedwm.client.fade.windows: 1 ! Fade windows (0/1)
speedwm.client.floatscratchpad: 0 ! Float a scratchpad window when it is shown (0/1)

View file

@ -145,6 +145,8 @@ static int hidesystray = 1; /* Hide systray by default (1
static int hideemptytags = 1; /* Hide empty tags (1) or show (0) */
static int hidetagpowerline = 0; /* Hide tag powerline (1) or show (0) */
static int hidetitlepowerline = 0; /* Hide title powerline (1) or show (0) */
static int hideborder = 0; /* Hide window border (1) or show (0) */
static int hidesingleborder = 1; /* Hide window border when there's only one window (1) or show (0) */
static int hidefloating = 0; /* Hide floating indicator (1) or show (0) */
static int hidesticky = 0; /* Hide sticky indicator (1) or show (0) */

View file

@ -5129,6 +5129,21 @@ resizeclient(Client *c, int x, int y, int w, int h)
if ((nexttiled(c->mon->clients) == c) && !(nexttiled(c->next)))
reset_layout(NULL);
if ((nexttiled(c->mon->clients) == c && !nexttiled(c->next) && hidesingleborder)
&& !c->isfullscreen && !c->isfloating
&& NULL != c->mon->lt[c->mon->sellt]->arrange) {
c->w = wc.width += c->bw * 2;
c->h = wc.height += c->bw * 2;
wc.border_width = 0;
}
if (hideborder) {
c->w = wc.width += c->bw * 2;
c->h = wc.height += c->bw * 2;
wc.border_width = 0;
}
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c);
XSync(dpy, False);

View file

@ -97,6 +97,8 @@ ResourcePref resources[] = {
{ "bar.hide.floating", INTEGER, &hidefloating },
{ "bar.powerline.tag.shape", INTEGER, &tagplshape },
{ "bar.powerline.title.shape", INTEGER, &titleplshape },
{ "client.hide.border", INTEGER, &hideborder },
{ "client.hide.singleborder", INTEGER, &hidesingleborder },
{ "client.allowurgent", INTEGER, &allowurgent },
{ "status.statusallmons", INTEGER, &statusallmons },
{ "tag.resetlayout", INTEGER, &resetlayout },