_bspc() {
local commands='window desktop monitor query pointer rule restore control config quit'
- local settings='focused_border_color active_border_color normal_border_color presel_border_color focused_locked_border_color active_locked_border_color normal_locked_border_color urgent_border_color border_width window_gap split_ratio borderless_monocle gapless_monocle focus_follows_pointer pointer_follows_monitor apply_floating_atom auto_alternate auto_cancel history_aware_focus'
+ local settings='focused_border_color active_border_color normal_border_color presel_border_color focused_locked_border_color active_locked_border_color normal_locked_border_color urgent_border_color border_width window_gap top_padding right_padding bottom_padding left_padding split_ratio borderless_monocle gapless_monocle focus_follows_pointer pointer_follows_monitor apply_floating_atom auto_alternate auto_cancel history_aware_focus'
COMPREPLY=()
_bspc() {
local -a commands settings
commands=('window' 'desktop' 'monitor' 'query' 'pointer' 'rule' 'restore' 'control' 'config' 'quit')
- settings=('focused_border_color' 'active_border_color' 'normal_border_color' 'presel_border_color' 'focused_locked_border_color' 'active_locked_border_color' 'normal_locked_border_color' 'urgent_border_color' 'border_width' 'window_gap' 'split_ratio' 'borderless_monocle' 'gapless_monocle' 'focus_follows_pointer' 'pointer_follows_monitor' 'apply_floating_atom' 'auto_alternate' 'auto_cancel' 'history_aware_focus')
+ settings=('focused_border_color' 'active_border_color' 'normal_border_color' 'presel_border_color' 'focused_locked_border_color' 'active_locked_border_color' 'normal_locked_border_color' 'urgent_border_color' 'border_width' 'window_gap' 'top_padding' 'right_padding' 'bottom_padding' 'left_padding' 'split_ratio' 'borderless_monocle' 'gapless_monocle' 'focus_follows_pointer' 'pointer_follows_monitor' 'apply_floating_atom' 'auto_alternate' 'auto_cancel' 'history_aware_focus')
if (( CURRENT == 2 )) ; then
_values 'command' "$commands[@]"
elif (( CURRENT == 3 )) ; then
.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 09/13/2013
+.\" Date: 09/15/2013
.\" Manual: Bspwm Manual
.\" Source: Bspwm 0.8
.\" Language: English
.\"
-.TH "BSPWM" "1" "09/13/2013" "Bspwm 0\&.8" "Bspwm Manual"
+.TH "BSPWM" "1" "09/15/2013" "Bspwm 0\&.8" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Colors are either X color names or \fI#RRGGBB\fR, booleans are \fItrue\fR or \fIfalse\fR\&.
.sp
All the boolean settings are \fIfalse\fR by default\&.
+.SS "Global Settings"
.PP
\fIfocused_border_color\fR
.RS 4
Window border width\&.
.RE
.PP
-\fIwindow_gap\fR
-.RS 4
-Value of the gap that separates windows\&.
-.RE
-.PP
\fIsplit_ratio\fR
.RS 4
Default split ratio\&.
\fI_BSPWM_FLOATING_WINDOW\fR
atom of each window according to its floating state\&.
.RE
+.SS "Monitor Settings"
+.PP
+\fItop_padding\fR, \fIright_padding\fR, \fIbottom_padding\fR, \fIleft_padding\fR
+.RS 4
+Padding space added at the sides of the monitor\&.
+.RE
+.SS "Desktop Settings"
+.PP
+\fIwindow_gap\fR
+.RS 4
+Size of the gap that separates windows\&.
+.RE
.SH "ENVIRONMENT VARIABLES"
.PP
\fIBSPWM_SOCKET\fR
All the boolean settings are 'false' by default.
+Global Settings
+~~~~~~~~~~~~~~~
'focused_border_color'::
Color of the border of a focused window of a focused monitor.
'border_width'::
Window border width.
-'window_gap'::
- Value of the gap that separates windows.
-
'split_ratio'::
Default split ratio.
'apply_floating_atom'::
Set the value of the '_BSPWM_FLOATING_WINDOW' atom of each window according to its floating state.
+Monitor Settings
+~~~~~~~~~~~~~~~~
+
+'top_padding'::
+'right_padding'::
+'bottom_padding'::
+'left_padding'::
+ Padding space added at the sides of the monitor.
+
+Desktop Settings
+~~~~~~~~~~~~~~~~
+
+'window_gap'::
+ Size of the gap that separates windows.
+
Environment Variables
---------------------
for (monitor_t *m = mon_head; m != NULL; m = m->next)
for (desktop_t *d = m->desk_head; d != NULL; d = d->next)
d->window_gap = wg;
+#define MONSET(k) \
+ } else if (streq(#k, name)) { \
+ int v; \
+ if (sscanf(value, "%i", &v) != 1) \
+ return false; \
+ if (loc.monitor != NULL) \
+ loc.monitor->k = v; \
+ else \
+ for (monitor_t *m = mon_head; m!= NULL; m = m->next) \
+ m->k = v;
+ MONSET(top_padding)
+ MONSET(right_padding)
+ MONSET(bottom_padding)
+ MONSET(left_padding)
+#undef MONSET
} else if (streq("split_ratio", name)) {
double rat;
if (sscanf(value, "%lf", &rat) == 1 && rat > 0 && rat < 1)
return false;
else
snprintf(rsp, BUFSIZ, "%i", loc.desktop->window_gap);
+#define MONGET(k) \
+ else if (streq(#k, name)) \
+ if (loc.monitor == NULL) \
+ return false; \
+ else \
+ snprintf(rsp, BUFSIZ, "%i", loc.monitor->k);
+ MONGET(top_padding)
+ MONGET(right_padding)
+ MONGET(bottom_padding)
+ MONGET(left_padding)
+#undef MONGET
#define GETCOLOR(s) \
else if (streq(#s, name)) \
snprintf(rsp, BUFSIZ, "%s", s);