mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-10 23:50:41 -04:00
feat: add window jumping mode to overview
This commit is contained in:
parent
b9c6a2c196
commit
9541c6507a
6 changed files with 181 additions and 0 deletions
|
|
@ -1704,6 +1704,10 @@ int32_t toggleoverview(const Arg *arg) {
|
|||
overview_backup(c);
|
||||
}
|
||||
} else {
|
||||
if (selmon->is_jump_mode) {
|
||||
destroy_jump_hints(selmon);
|
||||
selmon->is_jump_mode = 0;
|
||||
}
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c && c->mon == selmon && !c->iskilling &&
|
||||
!client_is_unmanaged(c) && !c->isunglobal &&
|
||||
|
|
@ -1715,6 +1719,35 @@ int32_t toggleoverview(const Arg *arg) {
|
|||
view(&(Arg){.ui = target}, false);
|
||||
fix_mon_tagset_from_overview(selmon);
|
||||
refresh_monitors_workspaces_status(selmon);
|
||||
|
||||
if (selmon->isoverview && config.jump_mode) {
|
||||
selmon->is_jump_mode = 1;
|
||||
create_jump_hints(selmon);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t togglejump(const Arg *arg) {
|
||||
if (!selmon)
|
||||
return 0;
|
||||
|
||||
if (selmon->is_jump_mode) {
|
||||
destroy_jump_hints(selmon);
|
||||
selmon->is_jump_mode = 0;
|
||||
toggleoverview(arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!selmon->isoverview) {
|
||||
toggleoverview(arg);
|
||||
}
|
||||
|
||||
if (selmon->isoverview) {
|
||||
selmon->is_jump_mode = 1;
|
||||
create_jump_hints(selmon);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue