aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/config.h
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2019-12-11 11:00:39 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-12-12 10:37:30 -0500
commit2f3c6cccf5d6b2d6ffd3cee62e7b624dc80dc6e6 (patch)
tree69d3367cf7dbd7f756d45d89cd37e6016503a88d /include/sway/config.h
parentFix lingering workspace with scratchpad show (diff)
downloadsway-2f3c6cccf5d6b2d6ffd3cee62e7b624dc80dc6e6.tar.gz
sway-2f3c6cccf5d6b2d6ffd3cee62e7b624dc80dc6e6.tar.zst
sway-2f3c6cccf5d6b2d6ffd3cee62e7b624dc80dc6e6.zip
Add seat <seat> idle_{inhibit,wake} <sources...>
This adds seat configuration options which can be used to configure what events affect the idle behavior of sway. An example use-case is mobile devices: you would remove touch from the list of idle_wake events. This allows the phone to stay on while you're actively using it, but doesn't wake from idle on touch events while it's sleeping in your pocket.
Diffstat (limited to 'include/sway/config.h')
-rw-r--r--include/sway/config.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 9a00ccb5..3e3d2725 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -182,6 +182,15 @@ enum seat_keyboard_grouping {
182 KEYBOARD_GROUP_KEYMAP 182 KEYBOARD_GROUP_KEYMAP
183}; 183};
184 184
185enum sway_input_idle_source {
186 IDLE_SOURCE_KEYBOARD = 1 << 0,
187 IDLE_SOURCE_POINTER = 1 << 1,
188 IDLE_SOURCE_TOUCH = 1 << 2,
189 IDLE_SOURCE_TABLET_PAD = 1 << 3,
190 IDLE_SOURCE_TABLET_TOOL = 1 << 4,
191 IDLE_SOURCE_SWITCH = 1 << 5,
192};
193
185/** 194/**
186 * Options for multiseat and other misc device configurations 195 * Options for multiseat and other misc device configurations
187 */ 196 */
@@ -192,6 +201,7 @@ struct seat_config {
192 int hide_cursor_timeout; 201 int hide_cursor_timeout;
193 enum seat_config_allow_constrain allow_constrain; 202 enum seat_config_allow_constrain allow_constrain;
194 enum seat_keyboard_grouping keyboard_grouping; 203 enum seat_keyboard_grouping keyboard_grouping;
204 uint32_t idle_inhibit_sources, idle_wake_sources;
195 struct { 205 struct {
196 char *name; 206 char *name;
197 int size; 207 int size;