dotfiles

my shiny new dotfiles
git clone git://git.jakekoroman.com/dotfiles
Log | Files | Refs | README

commit 890596b1d6f157b6952028fe2eea5375881bd697
parent ab22399f41af4f9ff7b7abd8fc0edf925a4cda94
Author: Jake Koroman <jakekoroman@gmail.com>
Date:   Thu, 18 Jul 2024 22:07:16 -0400

gaps now apply to monocle layout.

Diffstat:
Mdwl/config.h | 2+-
Mdwl/dwl.c | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dwl/config.h b/dwl/config.h @@ -6,7 +6,6 @@ /* appearance */ static const int sloppyfocus = 1; /* focus follows mouse */ static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */ -static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ static int gaps = 0; /* 1 means gaps between windows are added */ static const unsigned int gappx = 10; /* gap pixel between windows */ static const unsigned int borderpx = 2; /* border pixel of windows */ @@ -40,6 +39,7 @@ enum LayoutFunction { lcenteredmaster = 3, }; + static const Layout layouts[] = { /* symbol arrange function */ [ltile] = { "[]=", tile }, diff --git a/dwl/dwl.c b/dwl/dwl.c @@ -2089,11 +2089,13 @@ monocle(Monitor *m) { Client *c; int n = 0; + unsigned int e = m->gaps; wl_list_for_each(c, &clients, link) { if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen) continue; - resize(c, m->w, 0); + resize(c, (struct wlr_box) { .x = m->w.x + gappx*e, .y = m->w.y + gappx*e, + .width = m->w.width - 2*gappx*e, .height = m->w.height - 2*gappx*e}, 0); n++; } if (n) @@ -3028,8 +3030,6 @@ tile(Monitor *m) n++; if (n == 0) return; - if (smartgaps == n) - e = 0; if (n > m->nmaster) mw = m->nmaster ? ROUND((m->w.width + gappx*e) * m->mfact) : 0;