mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-05 00:06:20 -04:00
feat: dwindle movetoroot dispatch
This commit is contained in:
parent
887a50a54e
commit
35ccafb9d2
7 changed files with 75 additions and 2 deletions
|
|
@ -2002,4 +2002,21 @@ int32_t focusid(const Arg *arg) {
|
|||
Client *c = arg->tc;
|
||||
focusclient(c, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t movetoroot(const Arg *arg) {
|
||||
if (!selmon)
|
||||
return 0;
|
||||
|
||||
Client *c = arg->tc ? arg->tc : selmon->sel;
|
||||
if (!c || c->isfloating)
|
||||
return 0;
|
||||
|
||||
if (c->mon && c->mon->pertag->ltidxs[c->mon->pertag->curtag]->id == DWINDLE) {
|
||||
uint32_t tag = c->mon->pertag->curtag;
|
||||
bool stable = (arg->i == 0);
|
||||
dwindle_movetoroot(&c->mon->pertag->dwindle_root[tag], c, stable);
|
||||
arrange(c->mon, false, false);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue