commit 7b2b29935ed6b1048d6d773c461d7cbed8f661ad
parent c34da87bd29e4718c952bcec7243b255b156f88a
Author: wh1tepearl <wh1tepearl@gmail.com>
Date: Sun, 25 Jan 2026 22:53:27 +0000
Tag to tag support
Diffstat:
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/modules.def.h b/modules.def.h
@@ -3,7 +3,7 @@
/* vxwm compile-time options */
#define BETTER_RESIZE 1 // yeah it's better resize support
-#define LOCK_MOVE_RESIZE_REFRESH_RATE 1 // recomended to use on every pc, because cpu (software) rendered apps like ST will lagg when resizing even if you have a good pc.
+#define LOCK_MOVE_RESIZE_REFRESH_RATE 1 // recomended to use on every pc, because cpu (software) rendered apps like ST will lag when resizing even if you have a good pc.
#define USE_RESIZECLIENT_FUNC 0 // use resizeclient function of instead of resize function, not recommended
#define GAPS 0 // gaps support
#define XRDB 0 //xrdb support
@@ -16,5 +16,6 @@
#define ALWAYS_CENTER_NEW_FLOATING_WINDOWS 0 //so, basically, it does what it says
#define WARP_TO_CLIENT 0 //it warps cursor, where? idk, but use it trust me bro
#define WARP_TO_CLIENT_AFFECTED_BY_INCNMASTER 0
-
+#define TAG_TO_TAG 1 //if you switch to tag where you already are, it'll switch to previous tag
+
#endif
diff --git a/vxwm.c b/vxwm.c
@@ -2371,21 +2371,36 @@ updatewmhints(Client *c)
}
}
+#if TAG_TO_TAG
void
view(const Arg *arg)
{
if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
- return;
- selmon->seltags ^= 1; /* toggle sel tagset */
- if (arg->ui & TAGMASK)
- selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
+ selmon->seltags ^= 1; /* toggle sel tagset */
+ else {
+ selmon->seltags ^= 1; /* toggle sel tagset */
+ if (arg->ui & TAGMASK)
+ selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
+ }
focus(NULL);
arrange(selmon);
#if EWMH_TAGS
updatecurrentdesktop();
#endif
}
-
+#else
+void
+view(const Arg *arg)
+{
+ if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
+ return;
+ selmon->seltags ^= 1; /* toggle sel tagset */
+ if (arg->ui & TAGMASK)
+ selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
+ focus(NULL);
+ arrange(selmon);
+}
+#endif
Client *
wintoclient(Window w)
{