diff options
| author | bakkeby <[email protected]> | 2021-04-06 12:47:38 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2021-04-06 12:47:38 +0200 |
| commit | 0c88a49e27fd0888c81aea5dd3eef1c537164a6a (patch) | |
| tree | b2066d2097de4b64a6d5845f35b9cd86a60f9b9a /patch | |
| parent | 905dc4d7afda05ca5dcc7c2f6dc9f0b25c7f8cda (diff) | |
| download | dwm-flexipatch-0c88a49e27fd0888c81aea5dd3eef1c537164a6a.tar.gz dwm-flexipatch-0c88a49e27fd0888c81aea5dd3eef1c537164a6a.zip | |
Adding distributetags patch
Diffstat (limited to 'patch')
| -rw-r--r-- | patch/distributetags.c | 16 | ||||
| -rw-r--r-- | patch/distributetags.h | 1 | ||||
| -rw-r--r-- | patch/include.c | 3 | ||||
| -rw-r--r-- | patch/include.h | 3 |
4 files changed, 23 insertions, 0 deletions
diff --git a/patch/distributetags.c b/patch/distributetags.c new file mode 100644 index 0000000..252eb8f --- /dev/null +++ b/patch/distributetags.c @@ -0,0 +1,16 @@ +void +distributetags(const Arg *arg) +{ + unsigned int ui = 1; + int i = 0; + for (Client *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; + } + focus(NULL); + arrange(selmon); +}
\ No newline at end of file diff --git a/patch/distributetags.h b/patch/distributetags.h new file mode 100644 index 0000000..5221050 --- /dev/null +++ b/patch/distributetags.h @@ -0,0 +1 @@ +static void distributetags(const Arg *arg);
\ No newline at end of file diff --git a/patch/include.c b/patch/include.c index 02ba47b..9e93ded 100644 --- a/patch/include.c +++ b/patch/include.c @@ -112,6 +112,9 @@ #if DECORATION_HINTS_PATCH #include "decorationhints.c" #endif +#if DISTRIBUTETAGS_PATCH +#include "distributetags.c" +#endif #if DRAGCFACT_PATCH && CFACTS_PATCH #include "dragcfact.c" #endif diff --git a/patch/include.h b/patch/include.h index 7aab494..5cf6e70 100644 --- a/patch/include.h +++ b/patch/include.h @@ -109,6 +109,9 @@ #if DECORATION_HINTS_PATCH #include "decorationhints.h" #endif +#if DISTRIBUTETAGS_PATCH +#include "distributetags.h" +#endif #if DRAGCFACT_PATCH && CFACTS_PATCH #include "dragcfact.h" #endif |
