mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Adding monoclesymbol patch
This commit is contained in:
parent
2de0c0e307
commit
8c768b21e1
@ -13,7 +13,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
||||
|
||||
### Changelog:
|
||||
|
||||
2019-10-04 - Added maximize patch
|
||||
2019-10-04 - Added maximize and monoclesymbol patches
|
||||
|
||||
2019-10-03 - Added onlyquitonempty and switchcol patches
|
||||
|
||||
@ -142,6 +142,10 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
||||
- adds rules per monitor, e.g. have default layouts per monitor
|
||||
- the use case for this is if the second monitor is vertical (i.e. rotated) then you may want to use a different default layout for this monitor than what is used for the main monitor (for example normal vertical split for main monitor and horizontal split for the second)
|
||||
|
||||
- [monoclesymbol](https://dwm.suckless.org/patches/monoclesymbol/)
|
||||
- always display the the monocle-symbol as defined in config.h if the monocle-layout is activated
|
||||
- do not display the number of open clients in the current tag
|
||||
|
||||
- [onlyquitonempty](https://dwm.suckless.org/patches/onlyquitonempty/)
|
||||
- makes it so dwm will only exit via quit() if no windows are open (in order to prevent accidental loss of work)
|
||||
|
||||
|
@ -1,14 +1,18 @@
|
||||
void
|
||||
monocle(Monitor *m)
|
||||
{
|
||||
#if !MONOCLESYMBOL_PATCH
|
||||
unsigned int n = 0;
|
||||
#endif // MONOCLESYMBOL_PATCH
|
||||
Client *c;
|
||||
|
||||
#if !MONOCLESYMBOL_PATCH
|
||||
for (c = m->clients; c; c = c->next)
|
||||
if (ISVISIBLE(c))
|
||||
n++;
|
||||
if (n > 0) /* override layout symbol */
|
||||
snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
|
||||
#endif // MONOCLESYMBOL_PATCH
|
||||
for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
|
||||
resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
|
||||
}
|
@ -203,6 +203,12 @@
|
||||
*/
|
||||
#define MONITOR_RULES_PATCH 0
|
||||
|
||||
/* Always display the the monocle-symbol as defined in config.h if the monocle-layout
|
||||
* is activated. Do not display the number of open clients in the current tag.
|
||||
* https://dwm.suckless.org/patches/monoclesymbol/
|
||||
*/
|
||||
#define MONOCLESYMBOL_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/
|
||||
|
Loading…
Reference in New Issue
Block a user