Skip to content

Instantly share code, notes, and snippets.

View bpsuntrup's full-sized avatar
😬
status: fidgeting

Benjamin Paul Suntrup bpsuntrup

😬
status: fidgeting
View GitHub Profile
@bpsuntrup
bpsuntrup / cards.h
Created January 16, 2024 19:11
dwm "cards" layout
void
cards(Monitor *mon) {
unsigned int i, n, nw, nh;
Client *c;
for(n = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next), n++);
if(n == 0)
return;
nw = mon->ww;
@bpsuntrup
bpsuntrup / reload.diff
Created February 10, 2023 16:13
patch to reload dwm in-flight
diff --git a/dwm.c b/dwm.c
index e5efb6a..a033028 100644
--- a/dwm.c
+++ b/dwm.c
@@ -189,6 +189,7 @@ static void pop(Client *c);
static void propertynotify(XEvent *e);
static void quit(const Arg *arg);
static Monitor *recttomon(int x, int y, int w, int h);
+static void reload(const Arg *arg);
static void resize(Client *c, int x, int y, int w, int h, int interact);