Fixes #365.
.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 01/02/2016
+.\" Date: 01/10/2016
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9-120-g5a9c710
+.\" Source: Bspwm 0.9-125-g74166b0
.\" Language: English
.\"
-.TH "BSPWM" "1" "01/02/2016" "Bspwm 0\&.9\-120\-g5a9c710" "Bspwm Manual"
+.TH "BSPWM" "1" "01/10/2016" "Bspwm 0\&.9\-125\-g74166b0" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
desktop layout\&.
.RE
.PP
+\fIpaddingless_monocle\fR
+.RS 4
+Remove padding space for the
+\fBmonocle\fR
+desktop layout\&.
+.RE
+.PP
\fIsingle_monocle\fR
.RS 4
Set the desktop layout to
'gapless_monocle'::
Remove gaps of tiled windows for the *monocle* desktop layout.
+'paddingless_monocle'::
+ Remove padding space for the *monocle* desktop layout.
+
'single_monocle'::
Set the desktop layout to *monocle* if there's only one tiled window in the tree.
return MSG_FAILURE;
SET_BOOL(borderless_monocle)
SET_BOOL(gapless_monocle)
+ SET_BOOL(paddingless_monocle)
SET_BOOL(single_monocle)
SET_BOOL(pointer_follows_focus)
SET_BOOL(pointer_follows_monitor)
fprintf(rsp, "%s", BOOL_STR(s));
GET_BOOL(borderless_monocle)
GET_BOOL(gapless_monocle)
+ GET_BOOL(paddingless_monocle)
GET_BOOL(single_monocle)
GET_BOOL(focus_follows_pointer)
GET_BOOL(pointer_follows_focus)
borderless_monocle = BORDERLESS_MONOCLE;
gapless_monocle = GAPLESS_MONOCLE;
+ paddingless_monocle = PADDINGLESS_MONOCLE;
single_monocle = SINGLE_MONOCLE;
focus_follows_pointer = FOCUS_FOLLOWS_POINTER;
pointer_follows_focus = POINTER_FOLLOWS_FOCUS;
#define FOCUS_BY_DISTANCE false
#define BORDERLESS_MONOCLE false
#define GAPLESS_MONOCLE false
+#define PADDINGLESS_MONOCLE false
#define SINGLE_MONOCLE false
#define FOCUS_FOLLOWS_POINTER false
#define POINTER_FOLLOWS_FOCUS false
bool borderless_monocle;
bool gapless_monocle;
+bool paddingless_monocle;
bool single_monocle;
bool focus_follows_pointer;
bool pointer_follows_focus;
return;
}
- layout_t set_layout = d->layout;
+ layout_t last_layout = d->layout;
if (single_monocle && tiled_count(d->root) == 1) {
d->layout = LAYOUT_MONOCLE;
}
xcb_rectangle_t rect = m->rectangle;
- int wg = (gapless_monocle && d->layout == LAYOUT_MONOCLE ? 0 : d->window_gap);
- rect.x += m->left_padding + d->left_padding + wg;
- rect.y += m->top_padding + d->top_padding + wg;
- rect.width -= m->left_padding + d->left_padding + d->right_padding + m->right_padding + wg;
- rect.height -= m->top_padding + d->top_padding + d->bottom_padding + m->bottom_padding + wg;
+
+ if (!paddingless_monocle || d->layout != LAYOUT_MONOCLE) {
+ rect.x += m->left_padding + d->left_padding;
+ rect.y += m->top_padding + d->top_padding;
+ rect.width -= m->left_padding + d->left_padding + d->right_padding + m->right_padding;
+ rect.height -= m->top_padding + d->top_padding + d->bottom_padding + m->bottom_padding;
+ }
+
+ if (!gapless_monocle || d->layout != LAYOUT_MONOCLE) {
+ rect.x += d->window_gap;
+ rect.y += d->window_gap;
+ rect.width -= d->window_gap;
+ rect.height -= d->window_gap;
+ }
apply_layout(m, d, d->root, rect, rect);
- d->layout = set_layout;
+ d->layout = last_layout;
}
void apply_layout(monitor_t *m, desktop_t *d, node_t *n, xcb_rectangle_t rect, xcb_rectangle_t root_rect)