Adding fakefullscreen client rule

This commit is contained in:
bakkeby 2020-09-16 11:00:31 +02:00
parent b3cb874ff5
commit b8dc848918
2 changed files with 36 additions and 10 deletions

14
dwm.c
View File

@ -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)

View File

@ -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/
*/