Adding distributetags patch

pull/112/head
bakkeby 3 years ago
parent 905dc4d7af
commit 0c88a49e27

@ -15,6 +15,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
2021-04-06 - Added the distributetags patch
2021-04-04 - Added option for having different gaps on a per tag basis
2021-03-31 - Added tapresize patch (contributed by [verschmelzen](https://github.com/verschmelzen))
@ -282,6 +284,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- some applications use this property to notify window managers to not draw window decorations
- not respecting this property leads to issues with applications that draw their own borders, like chromium (with "Use system title bar and borders" turned off) or vlc in fullscreen mode
- [distributetags](https://dwm.suckless.org/patches/reorganizetags/)
- this reorganisetags variant re-distributes all clients on the current monitor evenly across all tags
- [dmenumatchtop](https://dwm.suckless.org/patches/dmenumatchtop)
- updates the position of dmenu to match that of the bar
- i.e. if topbar is 0 then dmenu will appear at the bottom and if 1 then dmenu will appear at the top

@ -869,6 +869,9 @@ static Key keys[] = {
#if REORGANIZETAGS_PATCH
{ MODKEY|ControlMask, XK_r, reorganizetags, {0} },
#endif // REORGANIZETAGS_PATCH
#if DISTRIBUTETAGS_PATCH
{ MODKEY|ControlMask, XK_d, distributetags, {0} },
#endif // DISTRIBUTETAGS_PATCH
#if INSETS_PATCH
{ MODKEY|ShiftMask|ControlMask, XK_a, updateinset, {.v = &default_inset } },
#endif // INSETS_PATCH

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

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

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

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

@ -445,6 +445,12 @@
*/
#define DECORATION_HINTS_PATCH 0
/* This feature distributes all clients on the current monitor evenly across all tags.
* It is a variant of the reorganizetags patch.
* https://dwm.suckless.org/patches/reorganizetags/
*/
#define DISTRIBUTETAGS_PATCH 0
/* Similarly to the dragmfact patch this allows you to click and drag clients to change the
* cfact to adjust the client's size in the stack. This patch depends on the cfacts patch.
*/

Loading…
Cancel
Save