aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/bind.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-07-09 02:57:59 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2019-07-09 10:00:57 +0300
commit152e30c374382eecccb917e5c26d72a2ea53ef87 (patch)
tree9baab29c015d6246c0a00e1d596c54ced0e7384b /sway/commands/bind.c
parentMake mouse drag in tiled mode swap containers if no edge is selected (diff)
downloadsway-152e30c374382eecccb917e5c26d72a2ea53ef87.tar.gz
sway-152e30c374382eecccb917e5c26d72a2ea53ef87.tar.zst
sway-152e30c374382eecccb917e5c26d72a2ea53ef87.zip
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/commands/bind.c')
-rw-r--r--sway/commands/bind.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index 49b511ad..767c2fee 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -478,6 +478,8 @@ struct cmd_results *cmd_bind_or_unbind_switch(int argc, char **argv,
478 binding->flags |= BINDING_LOCKED; 478 binding->flags |= BINDING_LOCKED;
479 } else if (strcmp("--no-warn", argv[0]) == 0) { 479 } else if (strcmp("--no-warn", argv[0]) == 0) {
480 warn = false; 480 warn = false;
481 } else if (strcmp("--reload", argv[0]) == 0) {
482 binding->flags |= BINDING_RELOAD;
481 } else { 483 } else {
482 break; 484 break;
483 } 485 }