From d3db7d14cc9d1bb1af02dc299327df0a67eb4a65 Mon Sep 17 00:00:00 2001 From: Bakkeby Date: Mon, 10 Jan 2022 13:54:13 +0100 Subject: [PATCH] toggletag - keyboard shortcuts to view a given tag will toggle to the previous tag if the given tag is already active --- dwm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dwm.c b/dwm.c index a96f33c..68ceea2 100644 --- a/dwm.c +++ b/dwm.c @@ -2041,8 +2041,10 @@ updatewmhints(Client *c) void view(const Arg *arg) { - if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) + if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) { + view(&((Arg) { .ui = 0 })); return; + } selmon->seltags ^= 1; /* toggle sel tagset */ if (arg->ui & TAGMASK) selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; -- 2.19.1