mirror of https://github.com/bakkeby/patches
Adding toggletag patch
parent
bce5504cba
commit
b52c53c887
@ -0,0 +1,29 @@
|
||||
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
|
||||
|
Loading…
Reference in New Issue