diff options
author | tsxv478 <vt0451@yandex.ru> | 2022-08-27 23:39:03 +0300 |
---|---|---|
committer | tsxv478 <vt0451@yandex.ru> | 2022-08-27 23:39:03 +0300 |
commit | 78228baa8f93e0a2d20fd691f27395efb85e1974 (patch) | |
tree | c6004c07dd17bd85c8978923948b9c40ec7cec9c /config.def.h | |
parent | d5140f0c508402bee96db22ab89f7e2c8207d286 (diff) |
stacker
Diffstat (limited to 'config.def.h')
-rw-r--r-- | config.def.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/config.def.h b/config.def.h index cdd053f..b62459c 100644 --- a/config.def.h +++ b/config.def.h @@ -65,6 +65,9 @@ static const Layout layouts[] = { { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, +#define STACKKEYS(MOD,ACTION) \ + { MOD, XK_j, ACTION##stack, {.i = INC(+1) } }, \ + { MOD, XK_k, ACTION##stack, {.i = INC(-1) } }, /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } @@ -78,10 +81,10 @@ static const char *termcmd[] = { "st", NULL }; static Key keys[] = { /* modifier key function argument */ + STACKKEYS(MODKEY, focus) + STACKKEYS(MODKEY|ShiftMask, push) { MODKEY, XK_d, spawn, {.v = dmenucmd } }, { MODKEY, XK_space, spawn, {.v = termcmd } }, - { MODKEY, XK_j, focusstack, {.i = +1 } }, - { MODKEY, XK_k, focusstack, {.i = -1 } }, { MODKEY|ShiftMask, XK_equal, incnmaster, {.i = +1 } }, { MODKEY|ShiftMask, XK_minus, incnmaster, {.i = -1 } }, { MODKEY|ShiftMask, XK_h, setmfact, {.f = -0.05} }, |