mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Added shiftview patch
This commit is contained in:
parent
347ac5146c
commit
d644c89c74
@ -15,7 +15,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
||||
|
||||
### Changelog:
|
||||
|
||||
2020-01-29 - Added swapfocus patch
|
||||
2020-01-29 - Added swapfocus and shiftview patches
|
||||
|
||||
2020-01-26 - Added transfer patch
|
||||
|
||||
@ -272,6 +272,10 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
||||
- [setborderpx](https://dwm.suckless.org/patches/statuspadding/)
|
||||
- this patch allows border pixels to be changed during runtime
|
||||
|
||||
- [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
|
||||
|
||||
- [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)
|
||||
|
||||
|
@ -585,6 +585,10 @@ static Key keys[] = {
|
||||
{ MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} },
|
||||
#endif // VANITYGAPS_PATCH
|
||||
{ MODKEY, XK_Tab, view, {0} },
|
||||
#if SHIFTVIEW_PATCH
|
||||
{ MODKEY|ShiftMask, XK_Tab, shiftview, { .i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } },
|
||||
#endif // SHIFTVIEW_PATCH
|
||||
#if AWESOMEBAR_PATCH
|
||||
{ MODKEY, XK_z, showhideclient, {0} },
|
||||
#endif // AWESOMEBAR_PATCH
|
||||
|
@ -88,6 +88,9 @@
|
||||
#if SETBORDERPX_PATCH
|
||||
#include "setborderpx.c"
|
||||
#endif
|
||||
#if SHIFTVIEW_PATCH
|
||||
#include "shiftview.c"
|
||||
#endif
|
||||
#if SORTSCREENS_PATCH
|
||||
#ifdef XINERAMA
|
||||
#include "sortscreens.c"
|
||||
|
@ -88,6 +88,9 @@
|
||||
#if SETBORDERPX_PATCH
|
||||
#include "setborderpx.h"
|
||||
#endif
|
||||
#if SHIFTVIEW_PATCH
|
||||
#include "shiftview.h"
|
||||
#endif
|
||||
#if SORTSCREENS_PATCH
|
||||
#ifdef XINERAMA
|
||||
#include "sortscreens.h"
|
||||
|
15
patch/shiftview.c
Normal file
15
patch/shiftview.c
Normal file
@ -0,0 +1,15 @@
|
||||
void
|
||||
shiftview(const Arg *arg)
|
||||
{
|
||||
Arg shifted;
|
||||
|
||||
if(arg->i > 0) // left circular shift
|
||||
shifted.ui = (selmon->tagset[selmon->seltags] << arg->i)
|
||||
| (selmon->tagset[selmon->seltags] >> (LENGTH(tags) - arg->i));
|
||||
|
||||
else // right circular shift
|
||||
shifted.ui = selmon->tagset[selmon->seltags] >> (- arg->i)
|
||||
| selmon->tagset[selmon->seltags] << (LENGTH(tags) + arg->i);
|
||||
|
||||
view(&shifted);
|
||||
}
|
1
patch/shiftview.h
Normal file
1
patch/shiftview.h
Normal file
@ -0,0 +1 @@
|
||||
static void shiftview(const Arg *arg);
|
@ -389,6 +389,11 @@
|
||||
*/
|
||||
#define SETBORDERPX_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
|
||||
*/
|
||||
#define SHIFTVIEW_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
|
||||
|
Loading…
Reference in New Issue
Block a user