Adding distributetags patch

This commit is contained in:
bakkeby
2021-04-06 12:47:38 +02:00
parent 905dc4d7af
commit 0c88a49e27
7 changed files with 37 additions and 0 deletions

16
patch/distributetags.c Normal file
View File

@ -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);
}

1
patch/distributetags.h Normal file
View File

@ -0,0 +1 @@
static void distributetags(const Arg *arg);

View File

@ -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

View File

@ -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