From 78228baa8f93e0a2d20fd691f27395efb85e1974 Mon Sep 17 00:00:00 2001 From: tsxv478 Date: Sat, 27 Aug 2022 23:39:03 +0300 Subject: stacker --- config.def.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'config.def.h') 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} }, -- cgit v1.2.3