mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
Adding fakefullscreen client rule
This commit is contained in:
parent
b3cb874ff5
commit
b8dc848918
34
dwm.c
34
dwm.c
@ -459,6 +459,9 @@ typedef struct {
|
||||
int iscentered;
|
||||
#endif // CENTER_PATCH
|
||||
int isfloating;
|
||||
#if SELECTIVEFAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
||||
int isfakefullscreen;
|
||||
#endif // SELECTIVEFAKEFULLSCREEN_PATCH
|
||||
#if ISPERMANENT_PATCH
|
||||
int ispermanent;
|
||||
#endif // ISPERMANENT_PATCH
|
||||
@ -486,6 +489,11 @@ typedef struct {
|
||||
#else
|
||||
#define PERMANENT
|
||||
#endif // ISPERMANENT_PATCH
|
||||
#if SELECTIVEFAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
||||
#define FAKEFULLSCREEN , .isfakefullscreen = 1
|
||||
#else
|
||||
#define FAKEFULLSCREEN
|
||||
#endif // SELECTIVEFAKEFULLSCREEN_PATCH
|
||||
#if SWALLOW_PATCH
|
||||
#define NOSWALLOW , .noswallow = 1
|
||||
#define TERMINAL , .isterminal = 1
|
||||
@ -771,6 +779,9 @@ applyrules(Client *c)
|
||||
#if ISPERMANENT_PATCH
|
||||
c->ispermanent = r->ispermanent;
|
||||
#endif // ISPERMANENT_PATCH
|
||||
#if SELECTIVEFAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
||||
c->fakefullscreen = r->isfakefullscreen;
|
||||
#endif // SELECTIVEFAKEFULLSCREEN_PATCH
|
||||
#if SWALLOW_PATCH
|
||||
c->isterminal = r->isterminal;
|
||||
c->noswallow = r->noswallow;
|
||||
@ -825,6 +836,9 @@ applyrules(Client *c)
|
||||
}
|
||||
}
|
||||
#endif // SWITCHTAG_PATCH
|
||||
#if ONLY_ONE_RULE_MATCH_PATCH
|
||||
break;
|
||||
#endif // ONLY_ONE_RULE_MATCH_PATCH
|
||||
}
|
||||
}
|
||||
if (ch.res_class)
|
||||
@ -2552,16 +2566,16 @@ resizeclient(Client *c, int x, int y, int w, int h)
|
||||
#if NOBORDER_PATCH
|
||||
if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
|
||||
#if MONOCLE_LAYOUT
|
||||
|| &monocle == c->mon->lt[c->mon->sellt]->arrange
|
||||
#endif // MONOCLE_LAYOUT
|
||||
)
|
||||
#if FAKEFULLSCREEN_CLIENT_PATCH
|
||||
&& (c->fakefullscreen == 1 || !c->isfullscreen)
|
||||
#else
|
||||
&& !c->isfullscreen
|
||||
#endif // FAKEFULLSCREEN_CLIENT_PATCH
|
||||
&& !c->isfloating
|
||||
&& c->mon->lt[c->mon->sellt]->arrange) {
|
||||
|| &monocle == c->mon->lt[c->mon->sellt]->arrange
|
||||
#endif // MONOCLE_LAYOUT
|
||||
)
|
||||
#if FAKEFULLSCREEN_CLIENT_PATCH
|
||||
&& (c->fakefullscreen == 1 || !c->isfullscreen)
|
||||
#else
|
||||
&& !c->isfullscreen
|
||||
#endif // FAKEFULLSCREEN_CLIENT_PATCH
|
||||
&& !c->isfloating
|
||||
&& c->mon->lt[c->mon->sellt]->arrange) {
|
||||
c->w = wc.width += c->bw * 2;
|
||||
c->h = wc.height += c->bw * 2;
|
||||
wc.border_width = 0;
|
||||
|
@ -479,6 +479,8 @@
|
||||
* the space currently given to them.
|
||||
* The "twist" with this patch is that fake fullscreen can be toggled on a per client basis
|
||||
* rather than applying to all clients globally.
|
||||
* Also see the selectivefakefullscreen option that adds a rule option to enabled this on client
|
||||
* startup.
|
||||
*/
|
||||
#define FAKEFULLSCREEN_CLIENT_PATCH 0
|
||||
|
||||
@ -652,6 +654,9 @@
|
||||
*/
|
||||
#define NO_TRANSPARENT_BORDERS_PATCH 0
|
||||
|
||||
/* Minor patch that prevents more than one rule being matched for a given client. */
|
||||
#define ONLY_ONE_RULE_MATCH_PATCH 0
|
||||
|
||||
/* This patch makes it so dwm will only exit via quit() if no windows are open.
|
||||
* This is to prevent you accidentally losing all your work.
|
||||
* https://dwm.suckless.org/patches/onlyquitonempty/
|
||||
@ -753,6 +758,13 @@
|
||||
*/
|
||||
#define SCRATCHPAD_ALT_1_PATCH 0
|
||||
|
||||
/* As opposed to the original patch this only adds a rule option allowing fake fullscreen
|
||||
* to be enabled for applications when they start. This is intended to be used in combination
|
||||
* with the fakefullscreenclient patch and offers no practical functionality without it.
|
||||
* https://dwm.suckless.org/patches/selectivefakefullscreen/
|
||||
*/
|
||||
#define SELECTIVEFAKEFULLSCREEN_PATCH 0
|
||||
|
||||
/* Allows restarting dwm without the dependency of an external script.
|
||||
* https://dwm.suckless.org/patches/selfrestart/
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user