borderless_monocle
Whether to remove borders for tiled windows in monocle mode.
+ gapless_monocle
+ Whether to remove gaps for tiled windows in monocle mode.
+
focus_follows_mouse
Wether to focus the window under the mouse pointer.
.I borderless_monocle
Whether to remove borders for tiled windows in monocle mode.
.TP
+.I gapless_monocle
+Whether to remove gaps for tiled windows in monocle mode.
+.TP
.I focus_follows_mouse
Wether to focus the window under the mouse pointer.
.SH MOUSE BINDINGS
bool b;
if (parse_bool(value, &b))
borderless_monocle = b;
+ } else if (strcmp(name, "gapless_monocle") == 0) {
+ bool b;
+ if (parse_bool(value, &b))
+ gapless_monocle = b;
} else if (strcmp(name, "focus_follows_mouse") == 0) {
bool b;
if (parse_bool(value, &b))
snprintf(rsp, BUFSIZ, "%s (%06X)", urgent_border_color, urgent_border_color_pxl);
else if (strcmp(name, "borderless_monocle") == 0)
snprintf(rsp, BUFSIZ, "%s", BOOLSTR(borderless_monocle));
+ else if (strcmp(name, "gapless_monocle") == 0)
+ snprintf(rsp, BUFSIZ, "%s", BOOLSTR(gapless_monocle));
else if (strcmp(name, "focus_follows_mouse") == 0)
snprintf(rsp, BUFSIZ, "%s", BOOLSTR(focus_follows_mouse));
else if (strcmp(name, "wm_name") == 0)
bottom_padding = BOTTOM_PADDING;
borderless_monocle = BORDERLESS_MONOCLE;
+ gapless_monocle = GAPLESS_MONOCLE;
focus_follows_mouse = FOCUS_FOLLOWS_MOUSE;
}
#define RIGHT_PADDING 0
#define BORDERLESS_MONOCLE false
+#define GAPLESS_MONOCLE false
#define FOCUS_FOLLOWS_MOUSE false
char focused_border_color[MAXLEN];
int right_padding;
bool borderless_monocle;
+bool gapless_monocle;
bool focus_follows_mouse;
char wm_name[MAXLEN];
PRINTF("arrange %s%s%s\n", (num_monitors > 1 ? m->name : ""), (num_monitors > 1 ? " " : ""), d->name);
xcb_rectangle_t rect = m->rectangle;
- rect.x += left_padding + window_gap;
- rect.y += top_padding + window_gap;
- rect.width -= left_padding + right_padding + window_gap;
- rect.height -= top_padding + bottom_padding + window_gap;
+ int wg = (gapless_monocle && d->layout == LAYOUT_MONOCLE ? 0 : window_gap);
+ rect.x += left_padding + wg;
+ rect.y += top_padding + wg;
+ rect.width -= left_padding + right_padding + wg;
+ rect.height -= top_padding + bottom_padding + wg;
if (focus_follows_mouse)
get_pointer_position(&pointer_position);
apply_layout(m, d, d->root, rect, rect);
r = rect;
else if (d->layout == LAYOUT_MONOCLE)
r = root_rect;
- int bleed = window_gap + 2 * n->client->border_width;
+ int wg = (gapless_monocle && d->layout == LAYOUT_MONOCLE ? 0 : window_gap);
+ int bleed = wg + 2 * n->client->border_width;
r.width = (bleed < r.width ? r.width - bleed : 1);
r.height = (bleed < r.height ? r.height - bleed : 1);
n->client->tiled_rectangle = r;