diff options
author | 2016-09-05 10:15:57 -0400 | |
---|---|---|
committer | 2016-09-05 10:18:38 -0400 | |
commit | 0913eff9157a4ddc6c6d8b9b4ad23323ed6fcad3 (patch) | |
tree | 8485e59a100680aaf0c4040fffc449dd971342ec /sway | |
parent | Merge pull request #879 from zandrmartin/commands-refactor (diff) | |
download | sway-0913eff9157a4ddc6c6d8b9b4ad23323ed6fcad3.tar.gz sway-0913eff9157a4ddc6c6d8b9b4ad23323ed6fcad3.tar.zst sway-0913eff9157a4ddc6c6d8b9b4ad23323ed6fcad3.zip |
Add support for * input configs
Closes #852
Diffstat (limited to 'sway')
-rw-r--r-- | sway/handlers.c | 8 | ||||
-rw-r--r-- | sway/sway.5.txt | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 47af7bd5..26da5407 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -132,6 +132,14 @@ static bool handle_input_created(struct libinput_device *device) { | |||
132 | for (i = 0; i < config->input_configs->length; ++i) { | 132 | for (i = 0; i < config->input_configs->length; ++i) { |
133 | struct input_config *cur = config->input_configs->items[i]; | 133 | struct input_config *cur = config->input_configs->items[i]; |
134 | if (strcasecmp(identifier, cur->identifier) == 0) { | 134 | if (strcasecmp(identifier, cur->identifier) == 0) { |
135 | sway_log(L_DEBUG, "Matched input config for %s", | ||
136 | identifier); | ||
137 | ic = cur; | ||
138 | break; | ||
139 | } | ||
140 | if (strcasecmp("*", cur->identifier) == 0) { | ||
141 | sway_log(L_DEBUG, "Matched wildcard input config for %s", | ||
142 | identifier); | ||
135 | ic = cur; | 143 | ic = cur; |
136 | break; | 144 | break; |
137 | } | 145 | } |
diff --git a/sway/sway.5.txt b/sway/sway.5.txt index 84e5e7c5..b31edeb7 100644 --- a/sway/sway.5.txt +++ b/sway/sway.5.txt | |||
@@ -269,6 +269,8 @@ The default colors are: | |||
269 | Append _{_ to this command, the following lines will be commands to configure | 269 | Append _{_ to this command, the following lines will be commands to configure |
270 | the named input device, and _}_ on its own line will close the block. | 270 | the named input device, and _}_ on its own line will close the block. |
271 | + | 271 | + |
272 | **input * <block of commands>** may be used to match all input devices. | ||
273 | + | ||
272 | See **sway-input**(5) for details. | 274 | See **sway-input**(5) for details. |
273 | 275 | ||
274 | **kill**:: | 276 | **kill**:: |