Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -19,6 +19,8 @@ Browsing patches? There is a [map of patches](https://coggle.it/diagram/X9IiSSM6
|
|||||||
|
|
||||||
### Changelog:
|
### Changelog:
|
||||||
|
|
||||||
|
2022-07-04 - Added the shift-tools patch(es) with individual toggles
|
||||||
|
|
||||||
2022-06-20 - Added the renamed scratchpads patch
|
2022-06-20 - Added the renamed scratchpads patch
|
||||||
|
|
||||||
2022-06-17 - Ported the seamless restart feature from dusk into dwm-flexipatch
|
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/)
|
- [setborderpx](https://dwm.suckless.org/patches/setborderpx/)
|
||||||
- this patch allows border pixels to be changed during runtime
|
- 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)
|
- [shiftview](https://github.com/chau-bao-long/dotfiles/blob/master/suckless/dwm/shiftview.diff)
|
||||||
- adds keybindings for left and right circular shift through tags
|
- adds keybindings for left and right circular shift through tags
|
||||||
- also see focusadjacenttag
|
- also see focusadjacenttag
|
||||||
|
98
README.org
98
README.org
@ -133,6 +133,10 @@
|
|||||||
- [[#self-restart][Self Restart]]
|
- [[#self-restart][Self Restart]]
|
||||||
- [[#send-monitor-keep-focus][Send Monitor Keep Focus]]
|
- [[#send-monitor-keep-focus][Send Monitor Keep Focus]]
|
||||||
- [[#set-border-pixels][Set Border Pixels]]
|
- [[#set-border-pixels][Set Border Pixels]]
|
||||||
|
- [[#shift-both][Shift Both]]
|
||||||
|
- [[#shift-swap-tags][Shift Swap Tags]]
|
||||||
|
- [[#shift-tag][Shift Tag]]
|
||||||
|
- [[#shift-tag-clients][Shift Tag Clients]]
|
||||||
- [[#shift-view][Shift View]]
|
- [[#shift-view][Shift View]]
|
||||||
- [[#size-hints][Size Hints]]
|
- [[#size-hints][Size Hints]]
|
||||||
- [[#sort-screens][Sort Screens]]
|
- [[#sort-screens][Sort Screens]]
|
||||||
@ -291,6 +295,8 @@ Browsing patches? There is a [[https://coggle.it/diagram/X9IiSSM6PTWOM9Wz][map o
|
|||||||
|
|
||||||
** Changelog
|
** Changelog
|
||||||
|
|
||||||
|
2022-07-04 - Added the shift-tools patch(es) with individual toggles
|
||||||
|
|
||||||
2022-06-20 - Added the renamed scratchpads patch
|
2022-06-20 - Added the renamed scratchpads patch
|
||||||
|
|
||||||
2022-06-17 - Ported the seamless restart feature from dusk into dwm-flexipatch
|
2022-06-17 - Ported the seamless restart feature from dusk into dwm-flexipatch
|
||||||
@ -892,6 +898,9 @@ Browsing patches? There is a [[https://coggle.it/diagram/X9IiSSM6PTWOM9Wz][map o
|
|||||||
- [[https://dwm.suckless.org/patches/setborderpx/][setborderpx]]
|
- [[https://dwm.suckless.org/patches/setborderpx/][setborderpx]]
|
||||||
- this patch allows border pixels to be changed during runtime
|
- this patch allows border pixels to be changed during runtime
|
||||||
|
|
||||||
|
- [[https://dwm.suckless.org/patches/shift-tools/][shift-tools]]
|
||||||
|
- a group of functions that shift clients or views left or right
|
||||||
|
|
||||||
- [[https://github.com/chau-bao-long/dotfiles/blob/master/suckless/dwm/shiftview.diff][shiftview]]
|
- [[https://github.com/chau-bao-long/dotfiles/blob/master/suckless/dwm/shiftview.diff][shiftview]]
|
||||||
- adds keybindings for left and right circular shift through tags
|
- adds keybindings for left and right circular shift through tags
|
||||||
- also see focusadjacenttag
|
- also see focusadjacenttag
|
||||||
@ -2679,6 +2688,47 @@ https://dwm.suckless.org/patches/setborderpx/
|
|||||||
#define SETBORDERPX_PATCH 0
|
#define SETBORDERPX_PATCH 0
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
|
*** Shift Both
|
||||||
|
|
||||||
|
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/
|
||||||
|
|
||||||
|
#+BEGIN_SRC c :tangle patches.def.h
|
||||||
|
#define SHIFTBOTH_PATCH 0
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Shift Swap Tags
|
||||||
|
|
||||||
|
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/
|
||||||
|
|
||||||
|
#+BEGIN_SRC c :tangle patches.def.h
|
||||||
|
#define SHIFTSWAPTAGS_PATCH 0
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Shift Tag
|
||||||
|
|
||||||
|
Moves the current selected client to the adjacent tag. Also see the focusadjacenttag patch.
|
||||||
|
|
||||||
|
https://dwm.suckless.org/patches/shift-tools/
|
||||||
|
|
||||||
|
#+BEGIN_SRC c :tangle patches.def.h
|
||||||
|
#define SHIFTTAG_PATCH 0
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Shift Tag Clients
|
||||||
|
|
||||||
|
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/
|
||||||
|
|
||||||
|
#+BEGIN_SRC c :tangle patches.def.h
|
||||||
|
#define SHIFTTAGCLIENTS_PATCH 0
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
*** Shift View
|
*** Shift View
|
||||||
|
|
||||||
**** Main
|
**** Main
|
||||||
@ -4710,6 +4760,16 @@ static Key keys[] = {
|
|||||||
|
|
||||||
{ MODKEY, XK_Tab, view, {0} },
|
{ 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 SHIFTTAGCLIENTS_PATCH
|
||||||
|
{ MODKEY|ShiftMask|ControlMask, XK_Left, shifttagclients, { .i = -1 } },
|
||||||
|
{ MODKEY|ShiftMask|ControlMask, XK_Right, shifttagclients, { .i = +1 } },
|
||||||
|
#endif // SHIFTTAGCLIENTS_PATCH
|
||||||
|
|
||||||
#if SHIFTVIEW_PATCH
|
#if SHIFTVIEW_PATCH
|
||||||
{ MODKEY|ShiftMask, XK_Tab, shiftview, { .i = -1 } },
|
{ MODKEY|ShiftMask, XK_Tab, shiftview, { .i = -1 } },
|
||||||
{ MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } },
|
{ MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } },
|
||||||
@ -4720,6 +4780,16 @@ static Key keys[] = {
|
|||||||
{ MODKEY|Mod1Mask, XK_backslash, shiftviewclients, { .i = +1 } },
|
{ MODKEY|Mod1Mask, 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 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
|
#if BAR_WINTITLEACTIONS_PATCH
|
||||||
{ MODKEY|ControlMask, XK_z, showhideclient, {0} },
|
{ MODKEY|ControlMask, XK_z, showhideclient, {0} },
|
||||||
#endif // BAR_WINTITLEACTIONS_PATCH
|
#endif // BAR_WINTITLEACTIONS_PATCH
|
||||||
@ -4848,8 +4918,8 @@ static Key keys[] = {
|
|||||||
#if FOCUSADJACENTTAG_PATCH
|
#if FOCUSADJACENTTAG_PATCH
|
||||||
{ MODKEY, XK_Left, viewtoleft, {0} }, // note keybinding conflict with focusdir
|
{ MODKEY, XK_Left, viewtoleft, {0} }, // note keybinding conflict with focusdir
|
||||||
{ MODKEY, XK_Right, viewtoright, {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_Left, tagtoleft, {0} }, // note keybinding conflict with shifttag
|
||||||
{ MODKEY|ShiftMask, XK_Right, tagtoright, {0} },
|
{ MODKEY|ShiftMask, XK_Right, tagtoright, {0} }, // note keybinding conflict with shifttag
|
||||||
{ MODKEY|ControlMask, XK_Left, tagandviewtoleft, {0} },
|
{ MODKEY|ControlMask, XK_Left, tagandviewtoleft, {0} },
|
||||||
{ MODKEY|ControlMask, XK_Right, tagandviewtoright, {0} },
|
{ MODKEY|ControlMask, XK_Right, tagandviewtoright, {0} },
|
||||||
#endif // FOCUSADJACENTTAG_PATCH
|
#endif // FOCUSADJACENTTAG_PATCH
|
||||||
@ -5200,12 +5270,24 @@ static Signal signals[] = {
|
|||||||
{ "viewall", viewallex },
|
{ "viewall", viewallex },
|
||||||
{ "viewex", viewex },
|
{ "viewex", viewex },
|
||||||
{ "toggleview", toggleview },
|
{ "toggleview", toggleview },
|
||||||
|
#if SHIFTBOTH_PATCH
|
||||||
|
{ "shiftboth", shiftboth },
|
||||||
|
#endif // SHIFTBOTH_PATCH
|
||||||
|
#if SHIFTTAG_PATCH
|
||||||
|
{ "shifttag", shifttag },
|
||||||
|
#endif // SHIFTTAG_PATCH
|
||||||
|
#if SHIFTTAGCLIENTS_PATCH
|
||||||
|
{ "shifttagclients", shifttagclients },
|
||||||
|
#endif // SHIFTTAGCLIENTS_PATCH
|
||||||
#if SHIFTVIEW_PATCH
|
#if SHIFTVIEW_PATCH
|
||||||
{ "shiftview", shiftview },
|
{ "shiftview", shiftview },
|
||||||
#endif // SHIFTVIEW_PATCH
|
#endif // SHIFTVIEW_PATCH
|
||||||
#if SHIFTVIEW_CLIENTS_PATCH
|
#if SHIFTVIEW_CLIENTS_PATCH
|
||||||
{ "shiftviewclients", shiftviewclients },
|
{ "shiftviewclients", shiftviewclients },
|
||||||
#endif // SHIFTVIEW_CLIENTS_PATCH
|
#endif // SHIFTVIEW_CLIENTS_PATCH
|
||||||
|
#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH
|
||||||
|
{ "shiftswaptags", shiftswaptags },
|
||||||
|
#endif // SHIFTSWAPTAGS_PATCH
|
||||||
#if SELFRESTART_PATCH
|
#if SELFRESTART_PATCH
|
||||||
{ "self_restart", self_restart },
|
{ "self_restart", self_restart },
|
||||||
#endif // SELFRESTART_PATCH
|
#endif // SELFRESTART_PATCH
|
||||||
@ -5390,12 +5472,24 @@ static IPCCommand ipccommands[] = {
|
|||||||
#if SETBORDERPX_PATCH
|
#if SETBORDERPX_PATCH
|
||||||
IPCCOMMAND( setborderpx, 1, {ARG_TYPE_SINT} ),
|
IPCCOMMAND( setborderpx, 1, {ARG_TYPE_SINT} ),
|
||||||
#endif // SETBORDERPX_PATCH
|
#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 // SHIFTTAG_PATCH
|
||||||
|
#if SHIFTTAGCLIENTS_PATCH
|
||||||
|
IPCCOMMAND( shifttagclients, 1, {ARG_TYPE_SINT} ),
|
||||||
|
#endif // SHIFTVIEWCLIENTS_PATCH
|
||||||
#if SHIFTVIEW_PATCH
|
#if SHIFTVIEW_PATCH
|
||||||
IPCCOMMAND( shiftview, 1, {ARG_TYPE_SINT} ),
|
IPCCOMMAND( shiftview, 1, {ARG_TYPE_SINT} ),
|
||||||
#endif // SHIFTVIEW_PATCH
|
#endif // SHIFTVIEW_PATCH
|
||||||
#if SHIFTVIEW_CLIENTS_PATCH
|
#if SHIFTVIEW_CLIENTS_PATCH
|
||||||
IPCCOMMAND( shiftviewclients, 1, {ARG_TYPE_SINT} ),
|
IPCCOMMAND( shiftviewclients, 1, {ARG_TYPE_SINT} ),
|
||||||
#endif // SHIFTVIEW_CLIENTS_PATCH
|
#endif // SHIFTVIEW_CLIENTS_PATCH
|
||||||
|
#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH
|
||||||
|
IPCCOMMAND( shiftswaptags, 1, {ARG_TYPE_SINT} ),
|
||||||
|
#endif // SHIFTSWAPTAGS_PATCH
|
||||||
#if STACKER_PATCH
|
#if STACKER_PATCH
|
||||||
IPCCOMMAND( pushstack, 1, {ARG_TYPE_SINT} ),
|
IPCCOMMAND( pushstack, 1, {ARG_TYPE_SINT} ),
|
||||||
#endif // STACKER_PATCH
|
#endif // STACKER_PATCH
|
||||||
|
48
config.def.h
48
config.def.h
@ -1030,6 +1030,16 @@ static Key keys[] = {
|
|||||||
|
|
||||||
{ MODKEY, XK_Tab, view, {0} },
|
{ 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 SHIFTTAGCLIENTS_PATCH
|
||||||
|
{ MODKEY|ShiftMask|ControlMask, XK_Left, shifttagclients, { .i = -1 } },
|
||||||
|
{ MODKEY|ShiftMask|ControlMask, XK_Right, shifttagclients, { .i = +1 } },
|
||||||
|
#endif // SHIFTTAGCLIENTS_PATCH
|
||||||
|
|
||||||
#if SHIFTVIEW_PATCH
|
#if SHIFTVIEW_PATCH
|
||||||
{ MODKEY|ShiftMask, XK_Tab, shiftview, { .i = -1 } },
|
{ MODKEY|ShiftMask, XK_Tab, shiftview, { .i = -1 } },
|
||||||
{ MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } },
|
{ MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } },
|
||||||
@ -1040,6 +1050,16 @@ static Key keys[] = {
|
|||||||
{ MODKEY|Mod1Mask, XK_backslash, shiftviewclients, { .i = +1 } },
|
{ MODKEY|Mod1Mask, 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 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
|
#if BAR_WINTITLEACTIONS_PATCH
|
||||||
{ MODKEY|ControlMask, XK_z, showhideclient, {0} },
|
{ MODKEY|ControlMask, XK_z, showhideclient, {0} },
|
||||||
#endif // BAR_WINTITLEACTIONS_PATCH
|
#endif // BAR_WINTITLEACTIONS_PATCH
|
||||||
@ -1168,8 +1188,8 @@ static Key keys[] = {
|
|||||||
#if FOCUSADJACENTTAG_PATCH
|
#if FOCUSADJACENTTAG_PATCH
|
||||||
{ MODKEY, XK_Left, viewtoleft, {0} }, // note keybinding conflict with focusdir
|
{ MODKEY, XK_Left, viewtoleft, {0} }, // note keybinding conflict with focusdir
|
||||||
{ MODKEY, XK_Right, viewtoright, {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_Left, tagtoleft, {0} }, // note keybinding conflict with shifttag
|
||||||
{ MODKEY|ShiftMask, XK_Right, tagtoright, {0} },
|
{ MODKEY|ShiftMask, XK_Right, tagtoright, {0} }, // note keybinding conflict with shifttag
|
||||||
{ MODKEY|ControlMask, XK_Left, tagandviewtoleft, {0} },
|
{ MODKEY|ControlMask, XK_Left, tagandviewtoleft, {0} },
|
||||||
{ MODKEY|ControlMask, XK_Right, tagandviewtoright, {0} },
|
{ MODKEY|ControlMask, XK_Right, tagandviewtoright, {0} },
|
||||||
#endif // FOCUSADJACENTTAG_PATCH
|
#endif // FOCUSADJACENTTAG_PATCH
|
||||||
@ -1514,12 +1534,24 @@ static Signal signals[] = {
|
|||||||
{ "viewall", viewallex },
|
{ "viewall", viewallex },
|
||||||
{ "viewex", viewex },
|
{ "viewex", viewex },
|
||||||
{ "toggleview", toggleview },
|
{ "toggleview", toggleview },
|
||||||
|
#if SHIFTBOTH_PATCH
|
||||||
|
{ "shiftboth", shiftboth },
|
||||||
|
#endif // SHIFTBOTH_PATCH
|
||||||
|
#if SHIFTTAG_PATCH
|
||||||
|
{ "shifttag", shifttag },
|
||||||
|
#endif // SHIFTTAG_PATCH
|
||||||
|
#if SHIFTTAGCLIENTS_PATCH
|
||||||
|
{ "shifttagclients", shifttagclients },
|
||||||
|
#endif // SHIFTTAGCLIENTS_PATCH
|
||||||
#if SHIFTVIEW_PATCH
|
#if SHIFTVIEW_PATCH
|
||||||
{ "shiftview", shiftview },
|
{ "shiftview", shiftview },
|
||||||
#endif // SHIFTVIEW_PATCH
|
#endif // SHIFTVIEW_PATCH
|
||||||
#if SHIFTVIEW_CLIENTS_PATCH
|
#if SHIFTVIEW_CLIENTS_PATCH
|
||||||
{ "shiftviewclients", shiftviewclients },
|
{ "shiftviewclients", shiftviewclients },
|
||||||
#endif // SHIFTVIEW_CLIENTS_PATCH
|
#endif // SHIFTVIEW_CLIENTS_PATCH
|
||||||
|
#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH
|
||||||
|
{ "shiftswaptags", shiftswaptags },
|
||||||
|
#endif // SHIFTSWAPTAGS_PATCH
|
||||||
#if SELFRESTART_PATCH
|
#if SELFRESTART_PATCH
|
||||||
{ "self_restart", self_restart },
|
{ "self_restart", self_restart },
|
||||||
#endif // SELFRESTART_PATCH
|
#endif // SELFRESTART_PATCH
|
||||||
@ -1702,12 +1734,24 @@ static IPCCommand ipccommands[] = {
|
|||||||
#if SETBORDERPX_PATCH
|
#if SETBORDERPX_PATCH
|
||||||
IPCCOMMAND( setborderpx, 1, {ARG_TYPE_SINT} ),
|
IPCCOMMAND( setborderpx, 1, {ARG_TYPE_SINT} ),
|
||||||
#endif // SETBORDERPX_PATCH
|
#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 // SHIFTTAG_PATCH
|
||||||
|
#if SHIFTTAGCLIENTS_PATCH
|
||||||
|
IPCCOMMAND( shifttagclients, 1, {ARG_TYPE_SINT} ),
|
||||||
|
#endif // SHIFTVIEWCLIENTS_PATCH
|
||||||
#if SHIFTVIEW_PATCH
|
#if SHIFTVIEW_PATCH
|
||||||
IPCCOMMAND( shiftview, 1, {ARG_TYPE_SINT} ),
|
IPCCOMMAND( shiftview, 1, {ARG_TYPE_SINT} ),
|
||||||
#endif // SHIFTVIEW_PATCH
|
#endif // SHIFTVIEW_PATCH
|
||||||
#if SHIFTVIEW_CLIENTS_PATCH
|
#if SHIFTVIEW_CLIENTS_PATCH
|
||||||
IPCCOMMAND( shiftviewclients, 1, {ARG_TYPE_SINT} ),
|
IPCCOMMAND( shiftviewclients, 1, {ARG_TYPE_SINT} ),
|
||||||
#endif // SHIFTVIEW_CLIENTS_PATCH
|
#endif // SHIFTVIEW_CLIENTS_PATCH
|
||||||
|
#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH
|
||||||
|
IPCCOMMAND( shiftswaptags, 1, {ARG_TYPE_SINT} ),
|
||||||
|
#endif // SHIFTSWAPTAGS_PATCH
|
||||||
#if STACKER_PATCH
|
#if STACKER_PATCH
|
||||||
IPCCOMMAND( pushstack, 1, {ARG_TYPE_SINT} ),
|
IPCCOMMAND( pushstack, 1, {ARG_TYPE_SINT} ),
|
||||||
#endif // STACKER_PATCH
|
#endif // STACKER_PATCH
|
||||||
|
@ -232,6 +232,18 @@
|
|||||||
#if SETBORDERPX_PATCH
|
#if SETBORDERPX_PATCH
|
||||||
#include "setborderpx.c"
|
#include "setborderpx.c"
|
||||||
#endif
|
#endif
|
||||||
|
#if SHIFTBOTH_PATCH
|
||||||
|
#include "shiftboth.c"
|
||||||
|
#endif
|
||||||
|
#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH
|
||||||
|
#include "shiftswaptags.c"
|
||||||
|
#endif
|
||||||
|
#if SHIFTTAG_PATCH
|
||||||
|
#include "shifttag.c"
|
||||||
|
#endif
|
||||||
|
#if SHIFTTAGCLIENTS_PATCH
|
||||||
|
#include "shifttagclients.c"
|
||||||
|
#endif
|
||||||
#if SHIFTVIEW_PATCH
|
#if SHIFTVIEW_PATCH
|
||||||
#include "shiftview.c"
|
#include "shiftview.c"
|
||||||
#endif
|
#endif
|
||||||
|
@ -234,6 +234,18 @@
|
|||||||
#if SETBORDERPX_PATCH
|
#if SETBORDERPX_PATCH
|
||||||
#include "setborderpx.h"
|
#include "setborderpx.h"
|
||||||
#endif
|
#endif
|
||||||
|
#if SHIFTBOTH_PATCH
|
||||||
|
#include "shiftboth.h"
|
||||||
|
#endif
|
||||||
|
#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH
|
||||||
|
#include "shiftswaptags.h"
|
||||||
|
#endif
|
||||||
|
#if SHIFTTAG_PATCH
|
||||||
|
#include "shifttag.h"
|
||||||
|
#endif
|
||||||
|
#if SHIFTTAGCLIENTS_PATCH
|
||||||
|
#include "shifttagclients.h"
|
||||||
|
#endif
|
||||||
#if SHIFTVIEW_PATCH
|
#if SHIFTVIEW_PATCH
|
||||||
#include "shiftview.h"
|
#include "shiftview.h"
|
||||||
#endif
|
#endif
|
||||||
|
21
patch/shiftboth.c
Normal file
21
patch/shiftboth.c
Normal file
@ -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);
|
||||||
|
}
|
1
patch/shiftboth.h
Normal file
1
patch/shiftboth.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
static void shiftboth(const Arg *arg);
|
20
patch/shiftswaptags.c
Normal file
20
patch/shiftswaptags.c
Normal file
@ -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);
|
||||||
|
}
|
1
patch/shiftswaptags.h
Normal file
1
patch/shiftswaptags.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
static void shiftswaptags(const Arg *arg);
|
20
patch/shifttag.c
Normal file
20
patch/shifttag.c
Normal file
@ -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);
|
||||||
|
}
|
1
patch/shifttag.h
Normal file
1
patch/shifttag.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
static void shifttag(const Arg *arg);
|
49
patch/shifttagclients.c
Normal file
49
patch/shifttagclients.c
Normal file
@ -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);
|
||||||
|
}
|
1
patch/shifttagclients.h
Normal file
1
patch/shifttagclients.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
static void shifttagclients(const Arg *arg);
|
@ -10,6 +10,8 @@ shiftviewclients(const Arg *arg)
|
|||||||
for (selmon = mons; selmon; selmon = selmon->next)
|
for (selmon = mons; selmon; selmon = selmon->next)
|
||||||
#endif // TAGSYNC_PATCH
|
#endif // TAGSYNC_PATCH
|
||||||
for (c = selmon->clients; c; c = c->next) {
|
for (c = selmon->clients; c; c = c->next) {
|
||||||
|
if (c == selmon->sel)
|
||||||
|
continue;
|
||||||
#if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH
|
#if SCRATCHPADS_PATCH && !RENAMED_SCRATCHPADS_PATCH
|
||||||
if (!(c->tags & SPTAGMASK))
|
if (!(c->tags & SPTAGMASK))
|
||||||
tagmask = tagmask | c->tags;
|
tagmask = tagmask | c->tags;
|
||||||
@ -44,4 +46,3 @@ shiftviewclients(const Arg *arg)
|
|||||||
|
|
||||||
view(&shifted);
|
view(&shifted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,4 +28,3 @@ swaptags(const Arg *arg)
|
|||||||
|
|
||||||
view(&((Arg) { .ui = newtag }));
|
view(&((Arg) { .ui = newtag }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,6 +267,14 @@
|
|||||||
|
|
||||||
#define SETBORDERPX_PATCH 0
|
#define SETBORDERPX_PATCH 0
|
||||||
|
|
||||||
|
#define SHIFTBOTH_PATCH 0
|
||||||
|
|
||||||
|
#define SHIFTSWAPTAGS_PATCH 0
|
||||||
|
|
||||||
|
#define SHIFTTAG_PATCH 0
|
||||||
|
|
||||||
|
#define SHIFTTAGCLIENTS_PATCH 0
|
||||||
|
|
||||||
#define SHIFTVIEW_PATCH 0
|
#define SHIFTVIEW_PATCH 0
|
||||||
|
|
||||||
#define SHIFTVIEW_CLIENTS_PATCH 0
|
#define SHIFTVIEW_CLIENTS_PATCH 0
|
||||||
|
Reference in New Issue
Block a user