Adding switchtag improvements

pull/32/head
bakkeby 5 years ago
parent 7d107ce8eb
commit ab2c5fe5da

@ -15,7 +15,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
2019-11-26 - Added dmenumatchtop patch
2019-11-26 - Added dmenumatchtop patch, added improvements to the switchtag patch based on ideas from the switchtotag patch
2019-11-21 - Added fakefullscreenclient patch

12
dwm.c

@ -149,6 +149,9 @@ struct Client {
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int bw, oldbw;
unsigned int tags;
#if SWITCHTAG_PATCH
unsigned int switchtag;
#endif // SWITCHTAG_PATCH
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
#if FAKEFULLSCREEN_CLIENT_PATCH
int fakefullscreen;
@ -526,9 +529,14 @@ applyrules(Client *c)
newtagset = c->tags;
if (newtagset) {
c->switchtag = selmon->tagset[selmon->seltags];
c->mon->tagset[c->mon->seltags] = newtagset;
if (r->switchtag == 1)
#if PERTAG_PATCH
pertagview(&((Arg) { .ui = newtagset }));
#else
view(&((Arg) { .ui = newtagset }));
#endif // PERTAG_PATCH
arrange(c->mon);
}
}
@ -3316,6 +3324,10 @@ unmanage(Client *c, int destroyed)
focus(NULL);
updateclientlist();
arrange(m);
#if SWITCHTAG_PATCH
if (c->switchtag)
view(&((Arg) { .ui = c->switchtag }));
#endif // SWITCHTAG_PATCH
}
void

@ -439,7 +439,10 @@
* 1 automatically moves you to the tag of the newly opened application and
* 2 enables the tag of the newly opened application in addition to your existing enabled tags
*
* Closing that window reverts the view back to what it was before the window was opened.
*
* https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-switchtag-6.2.diff
* Also see https://dwm.suckless.org/patches/switchtotag
*/
#define SWITCHTAG_PATCH 0

Loading…
Cancel
Save