Movestack functionality
This commit is contained in:
@@ -146,6 +146,8 @@ static const Key keys[] = {
|
|||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Right, shiftclient, {.i = +1} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Right, shiftclient, {.i = +1} },
|
||||||
{ MODKEY, XKB_KEY_Up, focusstack, {.i = -1} },
|
{ MODKEY, XKB_KEY_Up, focusstack, {.i = -1} },
|
||||||
{ MODKEY, XKB_KEY_Down, focusstack, {.i = +1} },
|
{ MODKEY, XKB_KEY_Down, focusstack, {.i = +1} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Up, movestack, {.i = -1} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Down, movestack, {.i = +1} },
|
||||||
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
|
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
|
||||||
{ MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },
|
{ MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
|
||||||
|
|||||||
@@ -305,6 +305,7 @@ static void motionnotify(uint32_t time, struct wlr_input_device *device, double
|
|||||||
double sy, double sx_unaccel, double sy_unaccel);
|
double sy, double sx_unaccel, double sy_unaccel);
|
||||||
static void motionrelative(struct wl_listener *listener, void *data);
|
static void motionrelative(struct wl_listener *listener, void *data);
|
||||||
static void moveresize(const Arg *arg);
|
static void moveresize(const Arg *arg);
|
||||||
|
static void movestack(const Arg *arg);
|
||||||
static void outputmgrapply(struct wl_listener *listener, void *data);
|
static void outputmgrapply(struct wl_listener *listener, void *data);
|
||||||
static void outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test);
|
static void outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test);
|
||||||
static void outputmgrtest(struct wl_listener *listener, void *data);
|
static void outputmgrtest(struct wl_listener *listener, void *data);
|
||||||
@@ -1808,6 +1809,8 @@ unset_fullscreen:
|
|||||||
if (w != c && w != p && w->isfullscreen && m == w->mon && (w->tags & c->tags))
|
if (w != c && w != p && w->isfullscreen && m == w->mon && (w->tags & c->tags))
|
||||||
setfullscreen(w, 0);
|
setfullscreen(w, 0);
|
||||||
}
|
}
|
||||||
|
if (c->mon)
|
||||||
|
focusclient(c, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -3099,6 +3102,38 @@ xytonode(double x, double y, struct wlr_surface **psurface,
|
|||||||
if (pl) *pl = l;
|
if (pl) *pl = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
movestack(const Arg *arg)
|
||||||
|
{
|
||||||
|
Client *c, *sel = focustop(selmon);
|
||||||
|
if (!sel || !selmon || !selmon->lt[selmon->sellt]->arrange || sel->isfloating)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (arg->i > 0) {
|
||||||
|
wl_list_for_each(c, &sel->link, link) {
|
||||||
|
if (&c->link == &clients)
|
||||||
|
continue;
|
||||||
|
if (VISIBLEON(c, selmon) && !c->isfloating)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
wl_list_for_each_reverse(c, &sel->link, link) {
|
||||||
|
if (&c->link == &clients)
|
||||||
|
continue;
|
||||||
|
if (VISIBLEON(c, selmon) && !c->isfloating)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (c == sel)
|
||||||
|
return;
|
||||||
|
wl_list_remove(&sel->link);
|
||||||
|
if (arg->i > 0)
|
||||||
|
wl_list_insert(&c->link, &sel->link);
|
||||||
|
else
|
||||||
|
wl_list_insert(c->link.prev, &sel->link);
|
||||||
|
arrange(selmon);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
zoom(const Arg *arg)
|
zoom(const Arg *arg)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user