diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-07-09 02:57:59 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-07-09 10:00:57 +0300 |
commit | 152e30c374382eecccb917e5c26d72a2ea53ef87 (patch) | |
tree | 9baab29c015d6246c0a00e1d596c54ced0e7384b /sway/sway.5.scd | |
parent | 538b36c0e2f9f0bf64ef473789e2598ac7d1629f (diff) |
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.
Diffstat (limited to 'sway/sway.5.scd')
-rw-r--r-- | sway/sway.5.scd | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/sway.5.scd b/sway/sway.5.scd index 90d7fed8..ca47c1f9 100644 --- a/sway/sway.5.scd +++ b/sway/sway.5.scd @@ -378,7 +378,7 @@ runtime. *bindcode* [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] [--input-device=<device>] [--no-warn] <code> <command> is also available for binding with key/button codes instead of key/button names. -*bindswitch* [--locked] [--no-warn] <switch>:<state> <command> +*bindswitch* [--locked] [--no-warn] [--reload] <switch>:<state> <command> Binds <switch> to execute the sway command _command_ on state changes. Supported switches are _lid_ (laptop lid) and _tablet_ (tablet mode) switches. Valid values for _state_ are _on_, _off_ and _toggle_. These @@ -391,6 +391,11 @@ runtime. and without _--locked_, the one with will be preferred when locked and the one without will be preferred when unlocked. + If the _--reload_ flag is given, the binding will also be executed when + the config is reloaded. _toggle_ bindings will not be executed on reload. + The _--locked_ flag will operate as normal so if the config is reloaded + while locked and _--locked_ is not given, the binding will not be executed. + By default, if you overwrite a binding, swaynag will give you a warning. To silence this, use the _--no-warn_ flag. |