diff options
| author | Luke Smith <[email protected]> | 2021-12-11 08:46:15 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-11 08:46:15 -0500 |
| commit | 20c5780d14274637bc1e08521fa050c37cedf0df (patch) | |
| tree | 1a79cfdcfe5a9829179677bdd735034c0dff6e57 | |
| parent | Merge pull request #178 from J0hsHH/patch-1 (diff) | |
| parent | Added function to toggle smartgaps and bound it to Super+Shift+apostrophe. (diff) | |
| download | seiwm-20c5780d14274637bc1e08521fa050c37cedf0df.tar.xz seiwm-20c5780d14274637bc1e08521fa050c37cedf0df.zip | |
Merge pull request #157 from jglueckstein/toggle-smartgaps
Added function to toggle smartgaps and bound it to Super+Shift+apostrophe
| -rw-r--r-- | config.h | 1 | ||||
| -rw-r--r-- | vanitygaps.c | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -201,6 +201,7 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_semicolon, shifttag, { .i = 1 } }, { MODKEY, XK_apostrophe, togglescratch, {.ui = 1} }, /* { MODKEY|ShiftMask, XK_apostrophe, spawn, SHCMD("") }, */ + { MODKEY|ShiftMask, XK_apostrophe, togglesmartgaps, {0} }, { MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0} }, diff --git a/vanitygaps.c b/vanitygaps.c index 7245e74..4c98e69 100644 --- a/vanitygaps.c +++ b/vanitygaps.c @@ -8,6 +8,7 @@ static void incrgaps(const Arg *arg); /* static void incrihgaps(const Arg *arg); */ /* static void incrivgaps(const Arg *arg); */ static void togglegaps(const Arg *arg); +static void togglesmartgaps(const Arg *arg); /* Layouts */ static void bstack(Monitor *m); @@ -49,6 +50,13 @@ togglegaps(const Arg *arg) } static void +togglesmartgaps(const Arg *arg) +{ + smartgaps = !smartgaps; + arrange(NULL); +} + +static void defaultgaps(const Arg *arg) { setgaps(gappoh, gappov, gappih, gappiv); |