diff --git a/README.md b/README.md index aa7a363..804fbcd 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t ### Changelog: -2020-05-03 - Added the no transparent borders patch which removes opacity from window borders when the alpha patch is not used +2020-05-03 - Added the shiftviewclients patch and the no transparent borders patch which removes opacity from window borders when the alpha patch is not used 2020-05-02 - Added dwmblocks patch @@ -329,6 +329,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t - adds keybindings for left and right circular shift through tags - also see focusadjacenttag + - [shiftviewclients](https://github.com/bakkeby/patches/blob/master/dwm/dwm-shiftviewclients-6.2.diff) + - variant of the shiftview patch which skips tags that has no clients + - [sortscreens](https://www.mail-archive.com/hackers@suckless.org/msg09400.html) - this patch aims to address some inconsistencies when it comes to focusmon, tagmon and similar functionality by explicitly sorting screens left to right (or top to bottom in a vertical layout) diff --git a/config.def.h b/config.def.h index c052c15..b72d587 100644 --- a/config.def.h +++ b/config.def.h @@ -777,6 +777,10 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_Tab, shiftview, { .i = -1 } }, { MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } }, #endif // SHIFTVIEW_PATCH + #if SHIFTVIEW_CLIENTS_PATCH + { MODKEY|Mod4Mask, XK_Tab, shiftviewclients, { .i = -1 } }, + { MODKEY|Mod4Mask, XK_backslash, shiftviewclients, { .i = +1 } }, + #endif // SHIFTVIEW_CLIENTS_PATCH #if AWESOMEBAR_PATCH { MODKEY|ControlMask, XK_z, showhideclient, {0} }, #endif // AWESOMEBAR_PATCH diff --git a/drw.c b/drw.c index b746bc0..a3d4f3f 100644 --- a/drw.c +++ b/drw.c @@ -242,8 +242,6 @@ drw_clr_create( dest->pixel |= 0xff << 24; #endif // NO_TRANSPARENT_BORDERS_PATCH #endif // ALPHA_PATCH - - } /* Wrapper to create color schemes. The caller has to call free(3) on the diff --git a/patch/include.c b/patch/include.c index f3f71e4..098d3eb 100644 --- a/patch/include.c +++ b/patch/include.c @@ -105,6 +105,9 @@ #if SHIFTVIEW_PATCH #include "shiftview.c" #endif +#if SHIFTVIEW_CLIENTS_PATCH +#include "shiftviewclients.c" +#endif #if SORTSCREENS_PATCH #ifdef XINERAMA #include "sortscreens.c" diff --git a/patch/include.h b/patch/include.h index 2dad7f1..aa40071 100644 --- a/patch/include.h +++ b/patch/include.h @@ -108,6 +108,9 @@ #if SHIFTVIEW_PATCH #include "shiftview.h" #endif +#if SHIFTVIEW_CLIENTS_PATCH +#include "shiftviewclients.h" +#endif #if SORTSCREENS_PATCH #ifdef XINERAMA #include "sortscreens.h" diff --git a/patch/shiftview.c b/patch/shiftview.c index 7e1a7a0..65a3dd6 100644 --- a/patch/shiftview.c +++ b/patch/shiftview.c @@ -3,7 +3,7 @@ shiftview(const Arg *arg) { Arg shifted; - if(arg->i > 0) // left circular shift + if (arg->i > 0) // left circular shift shifted.ui = (selmon->tagset[selmon->seltags] << arg->i) | (selmon->tagset[selmon->seltags] >> (LENGTH(tags) - arg->i)); @@ -12,4 +12,4 @@ shiftview(const Arg *arg) | selmon->tagset[selmon->seltags] << (LENGTH(tags) + arg->i); view(&shifted); -} \ No newline at end of file +} diff --git a/patches.def.h b/patches.def.h index 069d81b..8f2b0d9 100644 --- a/patches.def.h +++ b/patches.def.h @@ -447,6 +447,11 @@ */ #define SHIFTVIEW_PATCH 0 +/* This variant of the shiftview patch adds left and right circular shift through tags, + * but skips tags where there are no clients. + */ +#define SHIFTVIEW_CLIENTS_PATCH 0 + /* In a multi-head setup monitor 0 is by default the primary screen, with the left and right * screen being monitor 1 and 2 respectively. This patch sorts screens left to right (or * top to bottom in a vertical layout) which aims to address some inconsistencies when it