mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Adding switchtag improvements
This commit is contained in:
parent
7d107ce8eb
commit
ab2c5fe5da
@ -15,7 +15,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
|||||||
|
|
||||||
### Changelog:
|
### 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
|
2019-11-21 - Added fakefullscreenclient patch
|
||||||
|
|
||||||
|
12
dwm.c
12
dwm.c
@ -149,6 +149,9 @@ struct Client {
|
|||||||
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
||||||
int bw, oldbw;
|
int bw, oldbw;
|
||||||
unsigned int tags;
|
unsigned int tags;
|
||||||
|
#if SWITCHTAG_PATCH
|
||||||
|
unsigned int switchtag;
|
||||||
|
#endif // SWITCHTAG_PATCH
|
||||||
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
|
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
|
||||||
#if FAKEFULLSCREEN_CLIENT_PATCH
|
#if FAKEFULLSCREEN_CLIENT_PATCH
|
||||||
int fakefullscreen;
|
int fakefullscreen;
|
||||||
@ -526,9 +529,14 @@ applyrules(Client *c)
|
|||||||
newtagset = c->tags;
|
newtagset = c->tags;
|
||||||
|
|
||||||
if (newtagset) {
|
if (newtagset) {
|
||||||
|
c->switchtag = selmon->tagset[selmon->seltags];
|
||||||
c->mon->tagset[c->mon->seltags] = newtagset;
|
c->mon->tagset[c->mon->seltags] = newtagset;
|
||||||
if (r->switchtag == 1)
|
if (r->switchtag == 1)
|
||||||
|
#if PERTAG_PATCH
|
||||||
pertagview(&((Arg) { .ui = newtagset }));
|
pertagview(&((Arg) { .ui = newtagset }));
|
||||||
|
#else
|
||||||
|
view(&((Arg) { .ui = newtagset }));
|
||||||
|
#endif // PERTAG_PATCH
|
||||||
arrange(c->mon);
|
arrange(c->mon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3316,6 +3324,10 @@ unmanage(Client *c, int destroyed)
|
|||||||
focus(NULL);
|
focus(NULL);
|
||||||
updateclientlist();
|
updateclientlist();
|
||||||
arrange(m);
|
arrange(m);
|
||||||
|
#if SWITCHTAG_PATCH
|
||||||
|
if (c->switchtag)
|
||||||
|
view(&((Arg) { .ui = c->switchtag }));
|
||||||
|
#endif // SWITCHTAG_PATCH
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -439,7 +439,10 @@
|
|||||||
* 1 automatically moves you to the tag of the newly opened application and
|
* 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
|
* 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
|
* 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
|
#define SWITCHTAG_PATCH 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user