mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
cmd_bindswitch: add option to execute on reload
This adds a --reload flag to cmd_bindswitch that allows for the binding to be executed on reload. One possible use case for this is to allow users to disable outputs when the lid closes and enable them when the lid opens without having to open and re-close the lid after a reload.
This commit is contained in:
parent
538b36c0e2
commit
152e30c374
6 changed files with 63 additions and 26 deletions
|
|
@ -478,6 +478,8 @@ struct cmd_results *cmd_bind_or_unbind_switch(int argc, char **argv,
|
|||
binding->flags |= BINDING_LOCKED;
|
||||
} else if (strcmp("--no-warn", argv[0]) == 0) {
|
||||
warn = false;
|
||||
} else if (strcmp("--reload", argv[0]) == 0) {
|
||||
binding->flags |= BINDING_RELOAD;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue