From a15a25992646856066e986d070be5aa6a28e9d2b Mon Sep 17 00:00:00 2001 From: bakkeby Date: Mon, 4 Jul 2022 11:25:28 +0200 Subject: [PATCH 1/5] Adding shifttag patch ref. #270 --- config.def.h | 15 ++++++++++++--- patch/include.c | 3 +++ patch/include.h | 3 +++ patch/shifttag.c | 20 ++++++++++++++++++++ patch/shifttag.h | 1 + patches.def.h | 6 ++++++ 6 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 patch/shifttag.c create mode 100644 patch/shifttag.h diff --git a/config.def.h b/config.def.h index 40c9f46..e4c9f7b 100644 --- a/config.def.h +++ b/config.def.h @@ -979,6 +979,10 @@ static Key keys[] = { { MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} }, #endif // VANITYGAPS_PATCH { MODKEY, XK_Tab, view, {0} }, + #if SHIFTTAG_PATCH + { MODKEY|ShiftMask, XK_Left, shifttag, { .i = -1 } }, // note keybinding conflict with focusadjacenttag tagtoleft + { MODKEY|ShiftMask, XK_Right, shifttag, { .i = +1 } }, // note keybinding conflict with focusadjacenttag tagtoright + #endif // SHIFTTAG_PATCH #if SHIFTVIEW_PATCH { MODKEY|ShiftMask, XK_Tab, shiftview, { .i = -1 } }, { MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } }, @@ -1085,8 +1089,8 @@ static Key keys[] = { #if FOCUSADJACENTTAG_PATCH { MODKEY, XK_Left, viewtoleft, {0} }, // note keybinding conflict with focusdir { MODKEY, XK_Right, viewtoright, {0} }, // note keybinding conflict with focusdir - { MODKEY|ShiftMask, XK_Left, tagtoleft, {0} }, - { MODKEY|ShiftMask, XK_Right, tagtoright, {0} }, + { MODKEY|ShiftMask, XK_Left, tagtoleft, {0} }, // note keybinding conflict with shifttag + { MODKEY|ShiftMask, XK_Right, tagtoright, {0} }, // note keybinding conflict with shifttag { MODKEY|ControlMask, XK_Left, tagandviewtoleft, {0} }, { MODKEY|ControlMask, XK_Right, tagandviewtoright, {0} }, #endif // FOCUSADJACENTTAG_PATCH @@ -1421,6 +1425,9 @@ static Signal signals[] = { { "viewall", viewallex }, { "viewex", viewex }, { "toggleview", toggleview }, + #if SHIFTTAG_PATCH + { "shifttag", shifttag }, + #endif // SHIFTTAG_PATCH #if SHIFTVIEW_PATCH { "shiftview", shiftview }, #endif // SHIFTVIEW_PATCH @@ -1609,6 +1616,9 @@ static IPCCommand ipccommands[] = { #if SETBORDERPX_PATCH IPCCOMMAND( setborderpx, 1, {ARG_TYPE_SINT} ), #endif // SETBORDERPX_PATCH + #if SHIFTTAG_PATCH + IPCCOMMAND( shifttag, 1, {ARG_TYPE_SINT} ), + #endif // SHIFTVIEW_PATCH #if SHIFTVIEW_PATCH IPCCOMMAND( shiftview, 1, {ARG_TYPE_SINT} ), #endif // SHIFTVIEW_PATCH @@ -1669,4 +1679,3 @@ static IPCCommand ipccommands[] = { #endif // XRDB_PATCH }; #endif // IPC_PATCH - diff --git a/patch/include.c b/patch/include.c index 17f2e81..20ac9df 100644 --- a/patch/include.c +++ b/patch/include.c @@ -232,6 +232,9 @@ #if SETBORDERPX_PATCH #include "setborderpx.c" #endif +#if SHIFTTAG_PATCH +#include "shifttag.c" +#endif #if SHIFTVIEW_PATCH #include "shiftview.c" #endif diff --git a/patch/include.h b/patch/include.h index 0cf267a..6806b59 100644 --- a/patch/include.h +++ b/patch/include.h @@ -234,6 +234,9 @@ #if SETBORDERPX_PATCH #include "setborderpx.h" #endif +#if SHIFTTAG_PATCH +#include "shifttag.h" +#endif #if SHIFTVIEW_PATCH #include "shiftview.h" #endif diff --git a/patch/shifttag.c b/patch/shifttag.c new file mode 100644 index 0000000..97365f1 --- /dev/null +++ b/patch/shifttag.c @@ -0,0 +1,20 @@ +/* Sends a window to the next/prev tag */ +void +shifttag(const Arg *arg) +{ + Arg shifted; + #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH + shifted.ui = selmon->tagset[selmon->seltags]; + #else + shifted.ui = selmon->tagset[selmon->seltags]; + #endif // SCRATCHPADS_PATCH + + if (arg->i > 0) /* left circular shift */ + shifted.ui = ((shifted.ui << arg->i) | (shifted.ui >> (NUMTAGS - arg->i))); + else /* right circular shift */ + shifted.ui = ((shifted.ui >> -arg->i) | (shifted.ui << (NUMTAGS + arg->i))); + #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH + shifted.ui &= ~SPTAGMASK; + #endif // SCRATCHPADS_PATCH + tag(&shifted); +} diff --git a/patch/shifttag.h b/patch/shifttag.h new file mode 100644 index 0000000..624787f --- /dev/null +++ b/patch/shifttag.h @@ -0,0 +1 @@ +static void shifttag(const Arg *arg); diff --git a/patches.def.h b/patches.def.h index 3cc9756..ec6eab9 100644 --- a/patches.def.h +++ b/patches.def.h @@ -968,6 +968,12 @@ */ #define SETBORDERPX_PATCH 0 +/* Moves the current selected client to the adjacent tag. + * Also see the focusadjacenttag patch. + * https://dwm.suckless.org/patches/shift-tools/ + */ +#define SHIFTTAG_PATCH 0 + /* This patch adds keybindings for left and right circular shift through tags. * https://github.com/chau-bao-long/dotfiles/blob/master/suckless/dwm/shiftview.diff */ From 279c571986a8c9b22acf4fe462e3d1470bf2925e Mon Sep 17 00:00:00 2001 From: bakkeby Date: Mon, 4 Jul 2022 13:07:36 +0200 Subject: [PATCH 2/5] Adding shifttagclients patch ref. #270 --- config.def.h | 10 ++++++++ patch/include.c | 3 +++ patch/include.h | 3 +++ patch/shifttagclients.c | 49 ++++++++++++++++++++++++++++++++++++++++ patch/shifttagclients.h | 1 + patch/shiftviewclients.c | 3 ++- patches.def.h | 6 +++++ 7 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 patch/shifttagclients.c create mode 100644 patch/shifttagclients.h diff --git a/config.def.h b/config.def.h index e4c9f7b..c7ea6c3 100644 --- a/config.def.h +++ b/config.def.h @@ -983,6 +983,10 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_Left, shifttag, { .i = -1 } }, // note keybinding conflict with focusadjacenttag tagtoleft { MODKEY|ShiftMask, XK_Right, shifttag, { .i = +1 } }, // note keybinding conflict with focusadjacenttag tagtoright #endif // SHIFTTAG_PATCH + #if SHIFTTAGCLIENTS_PATCH + { MODKEY|ShiftMask|ControlMask, XK_Left, shifttagclients, { .i = -1 } }, + { MODKEY|ShiftMask|ControlMask, XK_Right, shifttagclients, { .i = +1 } }, + #endif // SHIFTTAGCLIENTS_PATCH #if SHIFTVIEW_PATCH { MODKEY|ShiftMask, XK_Tab, shiftview, { .i = -1 } }, { MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } }, @@ -1428,6 +1432,9 @@ static Signal signals[] = { #if SHIFTTAG_PATCH { "shifttag", shifttag }, #endif // SHIFTTAG_PATCH + #if SHIFTTAGCLIENTS_PATCH + { "shifttagclients", shifttagclients }, + #endif // SHIFTTAGCLIENTS_PATCH #if SHIFTVIEW_PATCH { "shiftview", shiftview }, #endif // SHIFTVIEW_PATCH @@ -1619,6 +1626,9 @@ static IPCCommand ipccommands[] = { #if SHIFTTAG_PATCH IPCCOMMAND( shifttag, 1, {ARG_TYPE_SINT} ), #endif // SHIFTVIEW_PATCH + #if SHIFTTAGCLIENTS_PATCH + IPCCOMMAND( shifttagclients, 1, {ARG_TYPE_SINT} ), + #endif // SHIFTVIEWCLIENTS_PATCH #if SHIFTVIEW_PATCH IPCCOMMAND( shiftview, 1, {ARG_TYPE_SINT} ), #endif // SHIFTVIEW_PATCH diff --git a/patch/include.c b/patch/include.c index 20ac9df..2af5433 100644 --- a/patch/include.c +++ b/patch/include.c @@ -235,6 +235,9 @@ #if SHIFTTAG_PATCH #include "shifttag.c" #endif +#if SHIFTTAGCLIENTS_PATCH +#include "shifttagclients.c" +#endif #if SHIFTVIEW_PATCH #include "shiftview.c" #endif diff --git a/patch/include.h b/patch/include.h index 6806b59..eb6b58f 100644 --- a/patch/include.h +++ b/patch/include.h @@ -237,6 +237,9 @@ #if SHIFTTAG_PATCH #include "shifttag.h" #endif +#if SHIFTTAGCLIENTS_PATCH +#include "shifttagclients.h" +#endif #if SHIFTVIEW_PATCH #include "shiftview.h" #endif diff --git a/patch/shifttagclients.c b/patch/shifttagclients.c new file mode 100644 index 0000000..e8da31d --- /dev/null +++ b/patch/shifttagclients.c @@ -0,0 +1,49 @@ +/* Sends a window to the next/prev tag that has a client, else it moves it to the next/prev one. */ +void +shifttagclients(const Arg *arg) +{ + Arg shifted; + Client *c; + unsigned int tagmask = 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 (c == selmon->sel) + continue; + #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH + if (!(c->tags & SPTAGMASK)) + tagmask = tagmask | c->tags; + #elif SCRATCHPAD_ALT_1_PATCH + if (!(c->tags & SCRATCHPAD_MASK)) + tagmask = tagmask | c->tags; + #else + tagmask = tagmask | c->tags; + #endif // SCRATCHPADS_PATCH + } + #if TAGSYNC_PATCH + selmon = origselmon; + #endif // TAGSYNC_PATCH + + #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH + shifted.ui = selmon->tagset[selmon->seltags] & ~SPTAGMASK; + #else + shifted.ui = selmon->tagset[selmon->seltags]; + #endif // SCRATCHPADS_PATCH + + do { + if (arg->i > 0) // left circular shift + shifted.ui = (shifted.ui << arg->i) + | (shifted.ui >> (NUMTAGS - arg->i)); + else // right circular shift + shifted.ui = (shifted.ui >> -arg->i) + | (shifted.ui << (NUMTAGS + arg->i)); + #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH + shifted.ui &= ~SPTAGMASK; + #endif // SCRATCHPADS_PATCH + } while (tagmask && !(shifted.ui & tagmask)); + + tag(&shifted); +} diff --git a/patch/shifttagclients.h b/patch/shifttagclients.h new file mode 100644 index 0000000..43049a0 --- /dev/null +++ b/patch/shifttagclients.h @@ -0,0 +1 @@ +static void shifttagclients(const Arg *arg); diff --git a/patch/shiftviewclients.c b/patch/shiftviewclients.c index 5755e7c..f64f42b 100644 --- a/patch/shiftviewclients.c +++ b/patch/shiftviewclients.c @@ -10,6 +10,8 @@ shiftviewclients(const Arg *arg) for (selmon = mons; selmon; selmon = selmon->next) #endif // TAGSYNC_PATCH for (c = selmon->clients; c; c = c->next) { + if (c == selmon->sel) + continue; #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH if (!(c->tags & SPTAGMASK)) tagmask = tagmask | c->tags; @@ -44,4 +46,3 @@ shiftviewclients(const Arg *arg) view(&shifted); } - diff --git a/patches.def.h b/patches.def.h index ec6eab9..83ae574 100644 --- a/patches.def.h +++ b/patches.def.h @@ -974,6 +974,12 @@ */ #define SHIFTTAG_PATCH 0 +/* Moves the current selected client to the adjacent tag that has at least one client, if none + * then it acts as shifttag. + * https://dwm.suckless.org/patches/shift-tools/ + */ +#define SHIFTTAGCLIENTS_PATCH 0 + /* This patch adds keybindings for left and right circular shift through tags. * https://github.com/chau-bao-long/dotfiles/blob/master/suckless/dwm/shiftview.diff */ From d3ab291944016be14002875ef8f4a318bd672c50 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Mon, 4 Jul 2022 13:34:41 +0200 Subject: [PATCH 3/5] Adding shiftboth patch ref. #270 --- config.def.h | 10 +++++++--- patch/include.c | 3 +++ patch/include.h | 3 +++ patch/shiftboth.c | 21 +++++++++++++++++++++ patch/shiftboth.h | 1 + patches.def.h | 6 ++++++ 6 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 patch/shiftboth.c create mode 100644 patch/shiftboth.h diff --git a/config.def.h b/config.def.h index c7ea6c3..d723ac1 100644 --- a/config.def.h +++ b/config.def.h @@ -990,11 +990,15 @@ static Key keys[] = { #if SHIFTVIEW_PATCH { MODKEY|ShiftMask, XK_Tab, shiftview, { .i = -1 } }, { MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } }, - #endif // SHIFTVIEW_PATCH - #if SHIFTVIEW_CLIENTS_PATCH + #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 + #endif // SHIFTVIEW_CLIENTS_PATCH + #if SHIFTBOTH_PATCH + { MODKEY|ControlMask, XK_Left, shiftboth, { .i = -1 } }, // note keybinding conflict with focusadjacenttag tagandviewtoleft + { MODKEY|ControlMask, XK_Right, shiftboth, { .i = +1 } }, // note keybinding conflict with focusadjacenttag tagandviewtoright + #endif // SHIFTBOTH_PATCH #if BAR_WINTITLEACTIONS_PATCH { MODKEY|ControlMask, XK_z, showhideclient, {0} }, #endif // BAR_WINTITLEACTIONS_PATCH diff --git a/patch/include.c b/patch/include.c index 2af5433..a4130da 100644 --- a/patch/include.c +++ b/patch/include.c @@ -232,6 +232,9 @@ #if SETBORDERPX_PATCH #include "setborderpx.c" #endif +#if SHIFTBOTH_PATCH +#include "shiftboth.c" +#endif #if SHIFTTAG_PATCH #include "shifttag.c" #endif diff --git a/patch/include.h b/patch/include.h index eb6b58f..095bd70 100644 --- a/patch/include.h +++ b/patch/include.h @@ -234,6 +234,9 @@ #if SETBORDERPX_PATCH #include "setborderpx.h" #endif +#if SHIFTBOTH_PATCH +#include "shiftboth.h" +#endif #if SHIFTTAG_PATCH #include "shifttag.h" #endif diff --git a/patch/shiftboth.c b/patch/shiftboth.c new file mode 100644 index 0000000..5c7c916 --- /dev/null +++ b/patch/shiftboth.c @@ -0,0 +1,21 @@ +void +shiftboth(const Arg *arg) +{ + Arg shifted; + #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH + shifted.ui = selmon->tagset[selmon->seltags]; + #else + shifted.ui = selmon->tagset[selmon->seltags]; + #endif // SCRATCHPADS_PATCH + + if (arg->i > 0) /* left circular shift */ + shifted.ui = ((shifted.ui << arg->i) | (shifted.ui >> (NUMTAGS - arg->i))); + else /* right circular shift */ + shifted.ui = ((shifted.ui >> -arg->i) | (shifted.ui << (NUMTAGS + arg->i))); + #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH + shifted.ui &= ~SPTAGMASK; + #endif // SCRATCHPADS_PATCH + + tag(&shifted); + view(&shifted); +} diff --git a/patch/shiftboth.h b/patch/shiftboth.h new file mode 100644 index 0000000..7a9b8c2 --- /dev/null +++ b/patch/shiftboth.h @@ -0,0 +1 @@ +static void shiftboth(const Arg *arg); diff --git a/patches.def.h b/patches.def.h index 83ae574..4b6719e 100644 --- a/patches.def.h +++ b/patches.def.h @@ -968,6 +968,12 @@ */ #define SETBORDERPX_PATCH 0 +/* Combines shifttag and shiftview. Basically moves the window to the next/prev tag and follows it. + * Also see the focusadjacenttag patch. + * https://dwm.suckless.org/patches/shift-tools/ + */ +#define SHIFTBOTH_PATCH 0 + /* Moves the current selected client to the adjacent tag. * Also see the focusadjacenttag patch. * https://dwm.suckless.org/patches/shift-tools/ From 197c218304eb31ec7ebaebedc485351f92587bfa Mon Sep 17 00:00:00 2001 From: bakkeby Date: Mon, 4 Jul 2022 13:56:39 +0200 Subject: [PATCH 4/5] Adding shiftswaptags patch ref. #270 --- config.def.h | 18 +++++++++++++++++- patch/include.c | 3 +++ patch/include.h | 3 +++ patch/shiftswaptags.c | 20 ++++++++++++++++++++ patch/shiftswaptags.h | 1 + patch/swaptags.c | 1 - patches.def.h | 6 ++++++ 7 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 patch/shiftswaptags.c create mode 100644 patch/shiftswaptags.h diff --git a/config.def.h b/config.def.h index d723ac1..da67f20 100644 --- a/config.def.h +++ b/config.def.h @@ -999,6 +999,10 @@ static Key keys[] = { { MODKEY|ControlMask, XK_Left, shiftboth, { .i = -1 } }, // note keybinding conflict with focusadjacenttag tagandviewtoleft { MODKEY|ControlMask, XK_Right, shiftboth, { .i = +1 } }, // note keybinding conflict with focusadjacenttag tagandviewtoright #endif // SHIFTBOTH_PATCH + #if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH + { MODKEY|Mod4Mask|ShiftMask, XK_Left, shiftswaptags, { .i = -1 } }, + { MODKEY|Mod4Mask|ShiftMask, XK_Right, shiftswaptags, { .i = +1 } }, + #endif // SHIFTSWAPTAGS_PATCH #if BAR_WINTITLEACTIONS_PATCH { MODKEY|ControlMask, XK_z, showhideclient, {0} }, #endif // BAR_WINTITLEACTIONS_PATCH @@ -1433,6 +1437,9 @@ static Signal signals[] = { { "viewall", viewallex }, { "viewex", viewex }, { "toggleview", toggleview }, + #if SHIFTBOTH_PATCH + { "shiftboth", shiftboth }, + #endif // SHIFTBOTH_PATCH #if SHIFTTAG_PATCH { "shifttag", shifttag }, #endif // SHIFTTAG_PATCH @@ -1445,6 +1452,9 @@ static Signal signals[] = { #if SHIFTVIEW_CLIENTS_PATCH { "shiftviewclients", shiftviewclients }, #endif // SHIFTVIEW_CLIENTS_PATCH + #if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH + { "shiftswaptags", shiftswaptags }, + #endif // SHIFTSWAPTAGS_PATCH #if SELFRESTART_PATCH { "self_restart", self_restart }, #endif // SELFRESTART_PATCH @@ -1627,9 +1637,12 @@ static IPCCommand ipccommands[] = { #if SETBORDERPX_PATCH IPCCOMMAND( setborderpx, 1, {ARG_TYPE_SINT} ), #endif // SETBORDERPX_PATCH + #if SHIFTBOTH_PATCH + IPCCOMMAND( shiftboth, 1, {ARG_TYPE_SINT} ), + #endif // SHIFTBOTH_PATCH #if SHIFTTAG_PATCH IPCCOMMAND( shifttag, 1, {ARG_TYPE_SINT} ), - #endif // SHIFTVIEW_PATCH + #endif // SHIFTTAG_PATCH #if SHIFTTAGCLIENTS_PATCH IPCCOMMAND( shifttagclients, 1, {ARG_TYPE_SINT} ), #endif // SHIFTVIEWCLIENTS_PATCH @@ -1639,6 +1652,9 @@ static IPCCommand ipccommands[] = { #if SHIFTVIEW_CLIENTS_PATCH IPCCOMMAND( shiftviewclients, 1, {ARG_TYPE_SINT} ), #endif // SHIFTVIEW_CLIENTS_PATCH + #if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH + IPCCOMMAND( shiftswaptags, 1, {ARG_TYPE_SINT} ), + #endif // SHIFTSWAPTAGS_PATCH #if STACKER_PATCH IPCCOMMAND( pushstack, 1, {ARG_TYPE_SINT} ), #endif // STACKER_PATCH diff --git a/patch/include.c b/patch/include.c index a4130da..5318ea2 100644 --- a/patch/include.c +++ b/patch/include.c @@ -235,6 +235,9 @@ #if SHIFTBOTH_PATCH #include "shiftboth.c" #endif +#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH +#include "shiftswaptags.c" +#endif #if SHIFTTAG_PATCH #include "shifttag.c" #endif diff --git a/patch/include.h b/patch/include.h index 095bd70..6803c5d 100644 --- a/patch/include.h +++ b/patch/include.h @@ -237,6 +237,9 @@ #if SHIFTBOTH_PATCH #include "shiftboth.h" #endif +#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH +#include "shiftswaptags.h" +#endif #if SHIFTTAG_PATCH #include "shifttag.h" #endif diff --git a/patch/shiftswaptags.c b/patch/shiftswaptags.c new file mode 100644 index 0000000..d9f797a --- /dev/null +++ b/patch/shiftswaptags.c @@ -0,0 +1,20 @@ +/* swaps "tags" (all the clients) with the next/prev tag. */ +void +shiftswaptags(const Arg *arg) +{ + Arg shifted; + #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH + shifted.ui = selmon->tagset[selmon->seltags]; + #else + shifted.ui = selmon->tagset[selmon->seltags]; + #endif // SCRATCHPADS_PATCH + + if (arg->i > 0) /* left circular shift */ + shifted.ui = ((shifted.ui << arg->i) | (shifted.ui >> (NUMTAGS - arg->i))); + else /* right circular shift */ + shifted.ui = ((shifted.ui >> -arg->i) | (shifted.ui << (NUMTAGS + arg->i))); + #if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH + shifted.ui &= ~SPTAGMASK; + #endif // SCRATCHPADS_PATCH + swaptags(&shifted); +} diff --git a/patch/shiftswaptags.h b/patch/shiftswaptags.h new file mode 100644 index 0000000..1977e36 --- /dev/null +++ b/patch/shiftswaptags.h @@ -0,0 +1 @@ +static void shiftswaptags(const Arg *arg); diff --git a/patch/swaptags.c b/patch/swaptags.c index 7e1e920..d2341ef 100644 --- a/patch/swaptags.c +++ b/patch/swaptags.c @@ -28,4 +28,3 @@ swaptags(const Arg *arg) view(&((Arg) { .ui = newtag })); } - diff --git a/patches.def.h b/patches.def.h index 4b6719e..3f5a27f 100644 --- a/patches.def.h +++ b/patches.def.h @@ -974,6 +974,12 @@ */ #define SHIFTBOTH_PATCH 0 +/* Swaps all the clients on the current tag with all the client on the next/prev tag. + * Depends on the swaptags patch. + * https://dwm.suckless.org/patches/shift-tools/ + */ +#define SHIFTSWAPTAGS_PATCH 0 + /* Moves the current selected client to the adjacent tag. * Also see the focusadjacenttag patch. * https://dwm.suckless.org/patches/shift-tools/ From 274602fa7a1e629a76d8b2b914e597c772b1add6 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Mon, 4 Jul 2022 14:07:17 +0200 Subject: [PATCH 5/5] Updating readme to refer to shift-tools --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 62472d0..abecc35 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ Browsing patches? There is a [map of patches](https://coggle.it/diagram/X9IiSSM6 ### Changelog: +2022-07-04 - Added the shift-tools patch(es) with individual toggles + 2022-06-20 - Added the renamed scratchpads patch 2022-06-17 - Ported the seamless restart feature from dusk into dwm-flexipatch @@ -621,6 +623,9 @@ Browsing patches? There is a [map of patches](https://coggle.it/diagram/X9IiSSM6 - [setborderpx](https://dwm.suckless.org/patches/setborderpx/) - this patch allows border pixels to be changed during runtime + - [shift-tools](https://dwm.suckless.org/patches/shift-tools/) + - a group of functions that shift clients or views left or right + - [shiftview](https://github.com/chau-bao-long/dotfiles/blob/master/suckless/dwm/shiftview.diff) - adds keybindings for left and right circular shift through tags - also see focusadjacenttag