feat: add overview jump mode
Some checks are pending
Sync website / sync-website (push) Waiting to run
Sync wiki / sync-wiki (push) Waiting to run

This commit is contained in:
DreamMaoMao 2026-06-16 18:59:25 +08:00
parent 24fb167ae6
commit a515ad9b91
13 changed files with 576 additions and 1 deletions

View file

@ -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;
}