mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-24 21:37:30 -04:00
feat: manual split
This commit is contained in:
parent
de694264a0
commit
8a3b94bc6f
7 changed files with 439 additions and 92 deletions
|
|
@ -1917,3 +1917,28 @@ int32_t toggle_all_floating(const Arg *arg) {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t dwindle_toggle_split_direction(const Arg *arg) {
|
||||
if (!selmon || !selmon->sel)
|
||||
return 0;
|
||||
|
||||
Client *c = selmon->sel;
|
||||
if (!c || !c->mon || c->isfloating)
|
||||
return 0;
|
||||
|
||||
const Layout *layout = c->mon->pertag->ltidxs[c->mon->pertag->curtag];
|
||||
|
||||
if (layout->id != DWINDLE)
|
||||
return 0;
|
||||
|
||||
DwindleNode **root = &selmon->pertag->dwindle_root[selmon->pertag->curtag];
|
||||
DwindleNode *leaf = dwindle_find_leaf(*root, c);
|
||||
|
||||
if (!leaf)
|
||||
return 0;
|
||||
|
||||
leaf->custom_leaf_split_h = !leaf->custom_leaf_split_h;
|
||||
bool hit_no_border = check_hit_no_border(c);
|
||||
apply_split_border(c, hit_no_border);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue