diff options
| author | Fuwn <[email protected]> | 2024-05-23 19:23:40 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-05-23 19:23:40 -0700 |
| commit | ab0cf5a42c5ebbc33d345c1ae75647eee6f83de0 (patch) | |
| tree | cdcc0d7f09e8801319415283d39d161f6ed726da | |
| parent | build(ninja): remove clang-format (diff) | |
| download | seiwm-ab0cf5a42c5ebbc33d345c1ae75647eee6f83de0.tar.xz seiwm-ab0cf5a42c5ebbc33d345c1ae75647eee6f83de0.zip | |
feat(dwm.c): add clientindicators patch + toggle
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | config.h | 1 | ||||
| -rw-r--r-- | dwm.c | 12 |
3 files changed, 14 insertions, 0 deletions
@@ -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 @@ -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 */ @@ -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); |