mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
feat: add dispatch exchange_stack_client
This commit is contained in:
parent
78990f66ff
commit
365854ccf6
3 changed files with 18 additions and 0 deletions
|
|
@ -717,6 +717,9 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value,
|
||||||
} else if (strcmp(func_name, "exchange_client") == 0) {
|
} else if (strcmp(func_name, "exchange_client") == 0) {
|
||||||
func = exchange_client;
|
func = exchange_client;
|
||||||
(*arg).i = parse_direction(arg_value);
|
(*arg).i = parse_direction(arg_value);
|
||||||
|
} else if (strcmp(func_name, "exchange_stack_client") == 0) {
|
||||||
|
func = exchange_stack_client;
|
||||||
|
(*arg).i = parse_circle_direction(arg_value);
|
||||||
} else if (strcmp(func_name, "toggleglobal") == 0) {
|
} else if (strcmp(func_name, "toggleglobal") == 0) {
|
||||||
func = toggleglobal;
|
func = toggleglobal;
|
||||||
} else if (strcmp(func_name, "toggleoverview") == 0) {
|
} else if (strcmp(func_name, "toggleoverview") == 0) {
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ void setsmfact(const Arg *arg);
|
||||||
void quit(const Arg *arg);
|
void quit(const Arg *arg);
|
||||||
void moveresize(const Arg *arg);
|
void moveresize(const Arg *arg);
|
||||||
void exchange_client(const Arg *arg);
|
void exchange_client(const Arg *arg);
|
||||||
|
void exchange_stack_client(const Arg *arg);
|
||||||
void killclient(const Arg *arg);
|
void killclient(const Arg *arg);
|
||||||
void toggleglobal(const Arg *arg);
|
void toggleglobal(const Arg *arg);
|
||||||
void incnmaster(const Arg *arg);
|
void incnmaster(const Arg *arg);
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,20 @@ void exchange_client(const Arg *arg) {
|
||||||
exchange_two_client(c, direction_select(arg));
|
exchange_two_client(c, direction_select(arg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void exchange_stack_client(const Arg *arg) {
|
||||||
|
Client *c = selmon->sel;
|
||||||
|
Client *tc;
|
||||||
|
if (!c || c->isfloating || c->isfullscreen || c->ismaxmizescreen)
|
||||||
|
return;
|
||||||
|
if (arg->i > 0) {
|
||||||
|
tc = get_next_stack_client(c, false);
|
||||||
|
} else {
|
||||||
|
tc = get_next_stack_client(c, true);
|
||||||
|
}
|
||||||
|
if (tc)
|
||||||
|
exchange_two_client(c, tc);
|
||||||
|
}
|
||||||
|
|
||||||
void focusdir(const Arg *arg) {
|
void focusdir(const Arg *arg) {
|
||||||
Client *c;
|
Client *c;
|
||||||
c = direction_select(arg);
|
c = direction_select(arg);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue