From 152e30c374382eecccb917e5c26d72a2ea53ef87 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Tue, 9 Jul 2019 02:57:59 -0400 Subject: 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. --- include/sway/input/switch.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'include/sway/input/switch.h') diff --git a/include/sway/input/switch.h b/include/sway/input/switch.h index 19bb1e77..213b471d 100644 --- a/include/sway/input/switch.h +++ b/include/sway/input/switch.h @@ -4,16 +4,20 @@ #include "sway/input/seat.h" struct sway_switch { - struct sway_seat_device *seat_device; + struct sway_seat_device *seat_device; + enum wlr_switch_state state; + enum wlr_switch_type type; - struct wl_listener switch_toggle; + struct wl_listener switch_toggle; }; struct sway_switch *sway_switch_create(struct sway_seat *seat, - struct sway_seat_device *device); + struct sway_seat_device *device); void sway_switch_configure(struct sway_switch *sway_switch); void sway_switch_destroy(struct sway_switch *sway_switch); +void sway_switch_retrigger_bindings_for_all(void); + #endif -- cgit v1.2.3-54-g00ecf