diff options
| author | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
|---|---|---|
| committer | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
| commit | 8cbadb61604667b407b53ee1258433994fa4765a (patch) | |
| tree | 97765fb29418fd6278fcb4cbb9760893afaf7a58 /dwm/patch/distributetags.c | |
Diffstat (limited to 'dwm/patch/distributetags.c')
| -rwxr-xr-x | dwm/patch/distributetags.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dwm/patch/distributetags.c b/dwm/patch/distributetags.c new file mode 100755 index 0000000..d786774 --- /dev/null +++ b/dwm/patch/distributetags.c @@ -0,0 +1,31 @@ +void +distributetags(const Arg *arg) +{ + Client *c; + unsigned int ui = 1; + int i = 0; + + #if TAGSYNC_PATCH + Monitor *origselmon = selmon; + for (selmon = mons; selmon; selmon = selmon->next) { + #endif // TAGSYNC_PATCH + + for (c = selmon->clients; c; c = c->next) { + if (HIDDEN(c)) + continue; + if (!(c->tags & TAGMASK)) + continue; + c->tags = (ui << i) & TAGMASK; + i = (i + 1) % NUMTAGS; + } + + #if TAGSYNC_PATCH + } + selmon = origselmon; + arrange(NULL); + focus(NULL); + #else + arrange(selmon); + focus(NULL); + #endif // TAGSYNC_PATCH +} |
