mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-11-15 06:59:52 -05:00
apply rotatetags patch
This commit is contained in:
parent
325145d4c6
commit
184340c86c
2 changed files with 41 additions and 1 deletions
29
dwl.c
29
dwl.c
|
|
@ -327,6 +327,7 @@ static Monitor *xytomon(double x, double y);
|
|||
static void xytonode(double x, double y, struct wlr_surface **psurface,
|
||||
Client **pc, LayerSurface **pl, double *nx, double *ny);
|
||||
static void zoom(const Arg *arg);
|
||||
static void rotatetags(const Arg *arg);
|
||||
|
||||
/* variables */
|
||||
static const char broken[] = "broken";
|
||||
|
|
@ -2739,6 +2740,34 @@ zoom(const Arg *arg)
|
|||
arrange(selmon);
|
||||
}
|
||||
|
||||
static void
|
||||
rotatetags(const Arg *arg)
|
||||
{
|
||||
Arg newarg;
|
||||
int i = arg->i;
|
||||
int nextseltags = 0, curseltags = selmon->tagset[selmon->seltags];
|
||||
bool shift = false;
|
||||
|
||||
switch(abs(i)) {
|
||||
default: break;
|
||||
case SHIFT_R:
|
||||
shift = true;
|
||||
break;
|
||||
};
|
||||
|
||||
if (i > 0)
|
||||
nextseltags = (curseltags << 1) | (curseltags >> (TAGCOUNT - 1));
|
||||
else
|
||||
nextseltags = (curseltags >> 1) | (curseltags << (TAGCOUNT - 1));
|
||||
|
||||
newarg.i = nextseltags;
|
||||
|
||||
if (shift) {
|
||||
tag(&newarg);
|
||||
} else
|
||||
view(&newarg);
|
||||
}
|
||||
|
||||
#ifdef XWAYLAND
|
||||
void
|
||||
activatex11(struct wl_listener *listener, void *data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue