aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config
diff options
context:
space:
mode:
authorLibravatar Michael Weiser <michael.weiser@gmx.de>2020-02-16 00:40:18 +0100
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2020-03-11 23:51:37 -0400
commit3ee5aace33f1b5673ab372afba38480338ba8b90 (patch)
treea91724f17a916a6075c71f555968fa046973fddd /sway/config
parentinput: Add support for keyboard shortcuts inhibit (diff)
downloadsway-3ee5aace33f1b5673ab372afba38480338ba8b90.tar.gz
sway-3ee5aace33f1b5673ab372afba38480338ba8b90.tar.zst
sway-3ee5aace33f1b5673ab372afba38480338ba8b90.zip
commands: Add shortcuts_inhibitor command
Add a command to influence keyboard shortcuts inhibitors. In its current form it can be used to activate, deactivate or toggle an existing inhibitor on the surface currently receiving input. This can be used to define an escape shortcut such as: bindsym --inhibited $mod+Escape seat - shortcuts_inhibitor deactivate It also allows the user to configure a per-seat default of whether keyboard inhibitors are honoured by default (the default) or not. Using the activate/toggle command they can then enable the lingering inhibitor at a later time of their choosing. As a side effect this allows to specifically address a named seat for actions as well, whatever use-case that might serve. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/seat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/config/seat.c b/sway/config/seat.c
index 6c916727..e2702de5 100644
--- a/sway/config/seat.c
+++ b/sway/config/seat.c
@@ -30,6 +30,7 @@ struct seat_config *new_seat_config(const char* name) {
30 } 30 }
31 seat->hide_cursor_timeout = -1; 31 seat->hide_cursor_timeout = -1;
32 seat->allow_constrain = CONSTRAIN_DEFAULT; 32 seat->allow_constrain = CONSTRAIN_DEFAULT;
33 seat->shortcuts_inhibit = SHORTCUTS_INHIBIT_DEFAULT;
33 seat->keyboard_grouping = KEYBOARD_GROUP_DEFAULT; 34 seat->keyboard_grouping = KEYBOARD_GROUP_DEFAULT;
34 seat->xcursor_theme.name = NULL; 35 seat->xcursor_theme.name = NULL;
35 seat->xcursor_theme.size = 24; 36 seat->xcursor_theme.size = 24;
@@ -154,6 +155,10 @@ void merge_seat_config(struct seat_config *dest, struct seat_config *source) {
154 dest->allow_constrain = source->allow_constrain; 155 dest->allow_constrain = source->allow_constrain;
155 } 156 }
156 157
158 if (source->shortcuts_inhibit != SHORTCUTS_INHIBIT_DEFAULT) {
159 dest->shortcuts_inhibit = source->shortcuts_inhibit;
160 }
161
157 if (source->keyboard_grouping != KEYBOARD_GROUP_DEFAULT) { 162 if (source->keyboard_grouping != KEYBOARD_GROUP_DEFAULT) {
158 dest->keyboard_grouping = source->keyboard_grouping; 163 dest->keyboard_grouping = source->keyboard_grouping;
159 } 164 }