mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-16 14:33:36 -04:00
feat: add overview jump mode
This commit is contained in:
parent
24fb167ae6
commit
a515ad9b91
13 changed files with 576 additions and 1 deletions
|
|
@ -1737,6 +1737,10 @@ int32_t toggleoverview(const Arg *arg) {
|
|||
uint32_t target;
|
||||
uint32_t visible_client_number = 0;
|
||||
|
||||
if (!selmon->isoverview && selmon->is_jump_mode) {
|
||||
finish_jump_mode(selmon);
|
||||
}
|
||||
|
||||
if (selmon->isoverview) {
|
||||
wl_list_for_each(c, &clients, link) if (c && c->mon == selmon &&
|
||||
!client_is_unmanaged(c) &&
|
||||
|
|
@ -1781,6 +1785,7 @@ int32_t toggleoverview(const Arg *arg) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
selmon->tagset[selmon->seltags] = target;
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c && c->mon == selmon && !c->iskilling &&
|
||||
|
|
@ -1794,6 +1799,24 @@ int32_t toggleoverview(const Arg *arg) {
|
|||
view(&(Arg){.ui = target}, false);
|
||||
fix_mon_tagset_from_overview(selmon);
|
||||
refresh_monitors_workspaces_status(selmon);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t togglejump(const Arg *arg) {
|
||||
if (!selmon)
|
||||
return 0;
|
||||
|
||||
if (!selmon->isoverview) {
|
||||
begin_jump_mode(selmon);
|
||||
toggleoverview(arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (selmon->isoverview) {
|
||||
toggleoverview(arg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue