From 362b95a5b9f91673f27f3e3343b5738df3c9d6e9 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Sun, 2 Jun 2019 15:11:57 +0100 Subject: [PATCH] Allows attach below to be toggled --- config.def.h | 2 +- dwm.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index cb8053a..b4d35aa 100644 --- a/config.def.h +++ b/config.def.h @@ -35,7 +35,7 @@ static const Rule rules[] = { static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ static const int nmaster = 1; /* number of clients in master area */ static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ -static const int attachbelow = 1; /* 1 means attach after the currently active window */ +static int attachbelow = 1; /* 1 means attach after the currently active window */ static const Layout layouts[] = { /* symbol arrange function */ diff --git a/dwm.c b/dwm.c index bd715a2..5d88653 100644 --- a/dwm.c +++ b/dwm.c @@ -148,6 +148,7 @@ static void arrange(Monitor *m); static void arrangemon(Monitor *m); static void attach(Client *c); static void attachBelow(Client *c); +static void toggleAttachBelow(); static void attachstack(Client *c); static void buttonpress(XEvent *e); static void checkotherwm(void); @@ -422,6 +423,11 @@ attachBelow(Client *c) } +void toggleAttachBelow() +{ + attachbelow = !attachbelow; +} + void attachstack(Client *c) {