diff --git a/config.h b/config.h index 742905b..849422f 100644 --- a/config.h +++ b/config.h @@ -208,7 +208,7 @@ static Key keys[] = { { MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0 } }, { MODKEY, XK_z, spawn, SHCMD("st -e tremc --skip-version-check") }, - /*{ MODKEY|ShiftMask, XK_z, spawn, SHCMD("st -e tremc") },*/ + { MODKEY|ShiftMask, XK_z, tagfocusmon, {.i = -1}}, { MODKEY, XK_x, spawn, SHCMD("slock & ( sleep 4; xset dpms force off; mpc pause ; pauseallmpv)") }, { MODKEY|ShiftMask, XK_x, spawn, SHCMD("prompt \"Shutdown computer?\" \"sudo -A shutdown -h now\"") }, { MODKEY, XK_c, togglescratch, {.ui = 1 } }, diff --git a/dwm.c b/dwm.c index 495b101..a7ba4f5 100644 --- a/dwm.c +++ b/dwm.c @@ -219,6 +219,7 @@ static void spawn(const Arg *arg); static void spiral(Monitor *mon); static void tag(const Arg *arg); static void tagmon(const Arg *arg); +static void tagfocusmon(const Arg *arg); static void tile(Monitor *); static void togglebar(const Arg *arg); static void togglefloating(const Arg *arg); @@ -1791,6 +1792,11 @@ tagmon(const Arg *arg) } } +void +tagfocusmon(const Arg *arg){ + tagmon(arg); + focusmon(arg); +} void tile(Monitor *m) {