aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--config.h1
-rw-r--r--dwm.c12
3 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index 8b87444..590ba44 100644
--- a/README.md
+++ b/README.md
@@ -98,3 +98,4 @@ sudo ninja install
centre the focused client's title
- [cursor](https://dwm.suckless.org/patches/cursorwarp/): Warps the mouse cursor
to the center of the target window when changing focus
+- [clientindicators](https://dwm.suckless.org/patches/clientindicators/): Dot indicator of open clients in non-vacent tags
diff --git a/config.h b/config.h
index 5b6772b..2e6adc0 100644
--- a/config.h
+++ b/config.h
@@ -30,6 +30,7 @@ static int swallowfloating = 0; /* 1 means swallow floating windows by
static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
static int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
+static const int enableclientindicators = 1;
static int centretitle = 0;
#define ICONSIZE 16 /* icon size */
#define ICONSPACING 5 /* space between icon and title */
diff --git a/dwm.c b/dwm.c
index 9faa6bd..a4659aa 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1113,6 +1113,7 @@ dirtomon(int dir)
void
drawbar(Monitor *m)
{
+ int indn;
int x, w, tw = 0, stw = 0;
int tlpad;
int boxs = drw->fonts->h / 9;
@@ -1145,9 +1146,20 @@ drawbar(Monitor *m)
if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
continue;
+ indn = 0;
w = TEXTW(tags[i]);
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
+
+ if (enableclientindicators) {
+ for (c = m->clients; c; c = c->next) {
+ if (c->tags & (1 << i)) {
+ drw_rect(drw, x, 1 + (indn * 2), selmon->sel == c ? 6 : 1, 1, 1, urg & 1 << i);
+ indn++;
+ }
+ }
+ }
+
x += w;
}
w = TEXTW(m->ltsymbol);