commit 38a6f2c644cd03474c5e985a39104a6fa23c0a81
Author: Tuxway Suckless <tuxway+suckless_AT_posteo.de>
Date: Sun Jul 5 13:21:21 2020 +0200
[dwm][patch] showselmon - showes which monitor is currently selected
diff --git a/dwm.suckless.org/patches/showselmon/dwm-showselmon-6.2.diff b/dwm.suckless.org/patches/showselmon/dwm-showselmon-6.2.diff
new file mode 100644
index 00000000..bbf837e2
--- /dev/null
+++ b/dwm.suckless.org/patches/showselmon/dwm-showselmon-6.2.diff
_AT_@ -0,0 +1,46 @@
+diff -up a/config.def.h b/config.def.h
+--- a/config.def.h 2020-07-04 13:56:23.316739958 +0200
++++ b/config.def.h 2020-07-04 13:57:58.020554340 +0200
+_AT_@ -15,6 +15,7 @@ static const char col_cyan[] = "#
+ static const char *colors[][3] = {
+ /* fg bg border */
+ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
++ [SchemeInv] = { col_gray1, col_gray3, col_gray2 },
+ [SchemeSel] = { col_gray4, col_cyan, col_cyan },
+ };
+
+diff -up a/dwm.c b/dwm.c
+--- a/dwm.c 2020-07-04 13:56:23.316739958 +0200
++++ b/dwm.c 2020-07-04 14:14:54.124590755 +0200
+_AT_@ -59,7 +59,7 @@
+
+ /* enums */
+ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
+-enum { SchemeNorm, SchemeSel }; /* color schemes */
++enum { SchemeNorm, SchemeInv, SchemeSel }; /* color schemes */
+ enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
+ NetWMFullscreen, NetActiveWindow, NetWMWindowType,
+ NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
+_AT_@ -716,7 +716,12 @@ drawbar(Monitor *m)
+ x = 0;
+ for (i = 0; i < LENGTH(tags); i++) {
+ w = TEXTW(tags[i]);
+- drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
++ if (m == selmon) {
++ drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
++ }
++ else {
++ drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeInv : SchemeNorm]);
++ }
+ drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
+ if (occ & 1 << i)
+ drw_rect(drw, x + boxs, boxs, boxw, boxw,
+_AT_@ -730,7 +735,7 @@ drawbar(Monitor *m)
+
+ if ((w = m->ww - sw - x) > bh) {
+ if (m->sel) {
+- drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
++ drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeInv]);
+ drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
+ if (m->sel->isfloating)
+ drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
diff --git a/dwm.suckless.org/patches/showselmon/index.md b/dwm.suckless.org/patches/showselmon/index.md
new file mode 100644
index 00000000..32ebf2f8
--- /dev/null
+++ b/dwm.suckless.org/patches/showselmon/index.md
_AT_@ -0,0 +1,21 @@
+showselmon
+==========
+
+Description
+-----------
+
+Shows which monitor is currently selected.
+Unselected monitors now use inverted colors in status bar.
+
+Can be helpful especially in combination with
+[statusallmons](
https://dwm.suckless.org/patches/statusallmons).
+
+Download
+--------
+
+* [dwm-showselmon-6.2.diff](dwm-showselmon-6.2.diff)
+
+Autor
+-----
+
+* Tuxway Suckless - <tuxway+suckless_AT_posteo.de>
Received on Sun Jul 05 2020 - 13:25:47 CEST