summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2021-05-30 19:26:27 +0200
committerbakkeby <[email protected]>2021-05-30 19:31:25 +0200
commitc968fd9aae7c18e61428bcab0f09798c2f9bdfb5 (patch)
tree93951faea0095d8cb5589b7fc9e49f8e108671ce
parent246f8f7260ee3fdd0cf0d6d73163cb1f4604c895 (diff)
downloaddwm-flexipatch-c968fd9aae7c18e61428bcab0f09798c2f9bdfb5.tar.gz
dwm-flexipatch-c968fd9aae7c18e61428bcab0f09798c2f9bdfb5.zip
Renaming VIEW_SAME_TAG_GIVES_PREVIOUS_TAG_PATCH to TOGGLETAG_PATCH
-rw-r--r--README.md2
-rw-r--r--dwm.c4
-rw-r--r--patches.def.h21
3 files changed, 16 insertions, 11 deletions
diff --git a/README.md b/README.md
index fa659e5..2d3e687 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ If you are experiencing issues then you may want to check out the [Known Issues]
### Changelog:
-2021-04-30 - Added togglelayout patch
+2021-05-30 - Added togglelayout and toggletag patches
2021-04-16 - Vanitygaps: replaced smartgaps with smartgaps\_fact, allowing gaps to be disabled or increased when there is only one client.
diff --git a/dwm.c b/dwm.c
index 8acedd4..f585ce4 100644
--- a/dwm.c
+++ b/dwm.c
@@ -4615,9 +4615,9 @@ view(const Arg *arg)
if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
#endif // EMPTYVIEW_PATCH
{
- #if VIEW_SAME_TAG_GIVES_PREVIOUS_TAG_PATCH
+ #if TOGGLETAG_PATCH
view(&((Arg) { .ui = 0 }));
- #endif // VIEW_SAME_TAG_GIVES_PREVIOUS_TAG_PATCH
+ #endif // TOGGLETAG_PATCH
return;
}
selmon->seltags ^= 1; /* toggle sel tagset */
diff --git a/patches.def.h b/patches.def.h
index eec285e..6212562 100644
--- a/patches.def.h
+++ b/patches.def.h
@@ -1083,6 +1083,19 @@
#define TOGGLELAYOUT_PATCH 0
+/* Minor patch that lets you use the same keyboard shortcut to toggle to the previous tag if the
+ * designated tag is already active.
+ *
+ * This allows you to use e.g. MOD+4 to quickly view the 4th tag and use the same keybinding to
+ * toggle back to what it was previously. The default behaviour in dwm forces you to use either
+ * MOD+tab or MOD+1 to change back to the previous tag.
+ *
+ * Idea ref.
+ * https://www.reddit.com/r/suckless/comments/ik27vd/key_toggle_between_next_and_previous_tag_dwm/
+ * https://github.com/bakkeby/patches/wiki/toggletag
+ */
+#define TOGGLETAG_PATCH 0
+
/* Lets you transfer the currently focused client between the master and stack area
* while increasing or decreasing the master area (nmaster) accordingly.
* https://dwm.suckless.org/patches/transfer/
@@ -1119,14 +1132,6 @@
*/
#define VIEWONTAG_PATCH 0
-/* By default tags can be changed using MOD+<num> while MOD+Tab toggles between the current and
- * the previous tag. This patch changes this so that if you hit MOD+<num> for the tag you are
- * currently on, then it works the same as MOD+Tab and switches back to the previous tag.
- * Idea ref.
- * https://www.reddit.com/r/suckless/comments/ik27vd/key_toggle_between_next_and_previous_tag_dwm/
- */
-#define VIEW_SAME_TAG_GIVES_PREVIOUS_TAG_PATCH 0
-
/* This patch warps the mouse cursor to the center of the currently focused window or screen
* when the mouse cursor is (a) on a different screen or (b) on top of a different window.
* https://dwm.suckless.org/patches/warp/