Permalink
Browse files

Extend disable_border option with `always`.

Setting `disable_border = always` removes border from lone tiled
windows, regardless of the bar being enabled/disabled. This is an
addition to an existing feature, and does not change existing behaviour.
  • Loading branch information...
bket authored and LordReg committed Nov 9, 2018
1 parent 4c589ae commit 8801799618b6cbbb056e14a5bc4a41040f65b377
Showing with 11 additions and 2 deletions.
  1. +6 −0 spectrwm.1
  2. +5 −2 spectrwm.c
@@ -288,6 +288,12 @@ This ratio is the screen size to what they will be resized.
For example, 0.6 is 60% of the physical screen size.
.It Ic disable_border
Remove border when bar is disabled and there is only one window on the region.
Enable by setting to 1.
Setting this to
.Ar always
removes border from lone tiled windows, regardless of the bar being
enabled/disabled.
Defaults to 0.
.It Ic focus_close
Window to put focus when the focused window is closed.
Possible values are
@@ -414,6 +414,7 @@ bool focus_close_wrap = true;
int focus_default = SWM_STACK_TOP;
int spawn_position = SWM_STACK_TOP;
bool disable_border = false;
bool disable_border_always = false;
int border_width = 1;
int region_padding = 0;
int tile_gap = 0;
@@ -5493,7 +5494,8 @@ stack_master(struct workspace *ws, struct swm_geometry *g, int rot, bool flip)
/* Window coordinates exclude frame. */

if (winno > 1 || !disable_border ||
(bar_enabled && ws->bar_enabled)) {
(bar_enabled && ws->bar_enabled &&
!disable_border_always)) {
bordered = true;
} else {
bordered = false;
@@ -9252,7 +9254,8 @@ setconfvalue(const char *selector, const char *value, int flags)
dialog_ratio = .6;
break;
case SWM_S_DISABLE_BORDER:
disable_border = (atoi(value) != 0);
disable_border_always = (strcmp(value, "always") == 0);
disable_border = (atoi(value) != 0) || disable_border_always;
break;
case SWM_S_FOCUS_CLOSE:
if (strcmp(value, "first") == 0)

0 comments on commit 8801799

Please sign in to comment.