diff options
-rw-r--r-- | sway/commands/seat.c | 12 | ||||
-rw-r--r-- | sway/commands/seat/attach.c | 3 | ||||
-rw-r--r-- | sway/sway-input.5.scd | 9 | ||||
-rw-r--r-- | swaybar/tray/icon.c | 2 |
4 files changed, 20 insertions, 6 deletions
diff --git a/sway/commands/seat.c b/sway/commands/seat.c index 81bb5f5d..5b23dcc6 100644 --- a/sway/commands/seat.c +++ b/sway/commands/seat.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <strings.h> | 2 | #include <strings.h> |
3 | #include "sway/commands.h" | 3 | #include "sway/commands.h" |
4 | #include "sway/input/input-manager.h" | 4 | #include "sway/input/input-manager.h" |
5 | #include "sway/input/seat.h" | ||
5 | #include "log.h" | 6 | #include "log.h" |
6 | #include "stringop.h" | 7 | #include "stringop.h" |
7 | 8 | ||
@@ -20,7 +21,16 @@ struct cmd_results *cmd_seat(int argc, char **argv) { | |||
20 | return error; | 21 | return error; |
21 | } | 22 | } |
22 | 23 | ||
23 | config->handler_context.seat_config = new_seat_config(argv[0]); | 24 | if (!strcmp(argv[0], "-")) { |
25 | if (config->reading) { | ||
26 | return cmd_results_new(CMD_FAILURE, | ||
27 | "Current seat alias (-) cannot be used in the config"); | ||
28 | } | ||
29 | config->handler_context.seat_config = | ||
30 | new_seat_config(config->handler_context.seat->wlr_seat->name); | ||
31 | } else { | ||
32 | config->handler_context.seat_config = new_seat_config(argv[0]); | ||
33 | } | ||
24 | if (!config->handler_context.seat_config) { | 34 | if (!config->handler_context.seat_config) { |
25 | return cmd_results_new(CMD_FAILURE, "Couldn't allocate config"); | 35 | return cmd_results_new(CMD_FAILURE, "Couldn't allocate config"); |
26 | } | 36 | } |
diff --git a/sway/commands/seat/attach.c b/sway/commands/seat/attach.c index 1e509a58..7615eef9 100644 --- a/sway/commands/seat/attach.c +++ b/sway/commands/seat/attach.c | |||
@@ -12,6 +12,9 @@ struct cmd_results *seat_cmd_attach(int argc, char **argv) { | |||
12 | if (!config->handler_context.seat_config) { | 12 | if (!config->handler_context.seat_config) { |
13 | return cmd_results_new(CMD_FAILURE, "No seat defined"); | 13 | return cmd_results_new(CMD_FAILURE, "No seat defined"); |
14 | } | 14 | } |
15 | if (config->reading) { | ||
16 | return cmd_results_new(CMD_DEFER, NULL); | ||
17 | } | ||
15 | 18 | ||
16 | struct seat_attachment_config *attachment = seat_attachment_config_new(); | 19 | struct seat_attachment_config *attachment = seat_attachment_config_new(); |
17 | if (!attachment) { | 20 | if (!attachment) { |
diff --git a/sway/sway-input.5.scd b/sway/sway-input.5.scd index 88b4347a..376e1833 100644 --- a/sway/sway-input.5.scd +++ b/sway/sway-input.5.scd | |||
@@ -140,10 +140,11 @@ Configure options for multiseat mode. | |||
140 | 140 | ||
141 | A *seat* is a collection of input devices that act independently of each other. | 141 | A *seat* is a collection of input devices that act independently of each other. |
142 | Seats are identified by name and the default seat is _seat0_ if no seats are | 142 | Seats are identified by name and the default seat is _seat0_ if no seats are |
143 | configured. Each seat has an independent keyboard focus and a separate cursor that | 143 | configured. While sway is running, _-_ (hyphen) can be used as an alias for the |
144 | is controlled by the pointer devices of the seat. This is useful for multiple | 144 | current seat. Each seat has an independent keyboard focus and a separate cursor |
145 | people using the desktop at the same time with their own devices (each sitting | 145 | that is controlled by the pointer devices of the seat. This is useful for |
146 | in their own "seat"). | 146 | multiple people using the desktop at the same time with their own devices (each |
147 | sitting in their own "seat"). | ||
147 | 148 | ||
148 | *seat* <name> attach <input_identifier> | 149 | *seat* <name> attach <input_identifier> |
149 | Attach an input device to this seat by its input identifier. A special | 150 | Attach an input device to this seat by its input identifier. A special |
diff --git a/swaybar/tray/icon.c b/swaybar/tray/icon.c index ed152be5..bf2736c2 100644 --- a/swaybar/tray/icon.c +++ b/swaybar/tray/icon.c | |||
@@ -135,7 +135,7 @@ static int entry_handler(char *group, char *key, char *value, | |||
135 | theme->name = strdup(value); | 135 | theme->name = strdup(value); |
136 | } else if (strcmp(key, "Comment") == 0) { | 136 | } else if (strcmp(key, "Comment") == 0) { |
137 | theme->comment = strdup(value); | 137 | theme->comment = strdup(value); |
138 | } else if (strcmp(key, "Inherists") == 0) { | 138 | } else if (strcmp(key, "Inherits") == 0) { |
139 | theme->inherits = strdup(value); | 139 | theme->inherits = strdup(value); |
140 | } else if (strcmp(key, "Directories") == 0) { | 140 | } else if (strcmp(key, "Directories") == 0) { |
141 | theme->directories = split_string(value, ","); | 141 | theme->directories = split_string(value, ","); |