summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--patch/monocle.c4
-rw-r--r--patches.h6
3 files changed, 15 insertions, 1 deletions
diff --git a/README.md b/README.md
index 1e04213..97568c2 100644
--- a/README.md
+++ b/README.md
@@ -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)
diff --git a/patch/monocle.c b/patch/monocle.c
index 5d7a270..d132f44 100644
--- a/patch/monocle.c
+++ b/patch/monocle.c
@@ -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);
} \ No newline at end of file
diff --git a/patches.h b/patches.h
index 2d31b3e..ff31936 100644
--- a/patches.h
+++ b/patches.h
@@ -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/