diff --git a/docs/example.Xresources b/docs/example.Xresources index 1f88eac..d0436ee 100644 --- a/docs/example.Xresources +++ b/docs/example.Xresources @@ -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) diff --git a/options.h b/options.h index a245ab0..365fbb6 100644 --- a/options.h +++ b/options.h @@ -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) */ diff --git a/speedwm.c b/speedwm.c index 4de844a..c64ebb6 100644 --- a/speedwm.c +++ b/speedwm.c @@ -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); diff --git a/xresources.h b/xresources.h index 89e6f7a..732960f 100644 --- a/xresources.h +++ b/xresources.h @@ -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 },