mirror of https://github.com/bakkeby/patches
toggletag - keyboard shortcuts to view a given tag will toggle to the previous layout if the given tag is already active or if the tag was previously selected
parent
831630a8ec
commit
d05d4fabc1
@ -0,0 +1,31 @@
|
||||
From 0f8a5889d590645dcf4a1059f73aedf9545eb96f Mon Sep 17 00:00:00 2001
|
||||
From: bakkeby <bakkeby@gmail.com>
|
||||
Date: Tue, 27 Jul 2021 14:27:23 +0200
|
||||
Subject: [PATCH] toggletag - keyboard shortcuts to view a given tag will
|
||||
toggle to the previous layout if the given tag is already active or if the
|
||||
tag was previously selected
|
||||
|
||||
---
|
||||
dwm.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index 4465af1..25b9ec1 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -2035,8 +2035,11 @@ updatewmhints(Client *c)
|
||||
void
|
||||
view(const Arg *arg)
|
||||
{
|
||||
- if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
|
||||
+ if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]
|
||||
+ || ((arg->ui & TAGMASK) & selmon->tagset[selmon->seltags^1])) {
|
||||
+ 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