2
0
mirror of https://github.com/bakkeby/patches synced 2024-11-13 07:10:31 +00:00
patches/dwm/dwm-toggletag-6.2.diff
2021-05-30 18:53:36 +02:00

30 lines
825 B
Diff

From 91cbdd7d3adb28bc3555aa2800eaa418347adb70 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com>
Date: Sun, 30 May 2021 18:52:58 +0200
Subject: [PATCH] toggletag - keyboard shortcuts to view a given tag will
toggle to the previous layout 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 4465af1..992d6ab 100644
--- a/dwm.c
+++ b/dwm.c
@@ -2035,8 +2035,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