aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLibravatar Dominique Martinet <asmadeus@codewreck.org>2017-12-29 15:31:04 +0100
committerLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-01-05 15:36:20 +0100
commitc83900593daace2ef85174163edf2748179e28f2 (patch)
tree40cdc706c8b1439d630c6b514817c8e6f0b4e4fd /sway/commands.c
parentMerge pull request #1552 from martinetd/cleanup (diff)
downloadsway-c83900593daace2ef85174163edf2748179e28f2.tar.gz
sway-c83900593daace2ef85174163edf2748179e28f2.tar.zst
sway-c83900593daace2ef85174163edf2748179e28f2.zip
config: add 'set' command
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index c1c6dc5d..f01329db 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -138,6 +138,7 @@ static struct cmd_handler handlers[] = {
138 { "input", cmd_input }, 138 { "input", cmd_input },
139 { "output", cmd_output }, 139 { "output", cmd_output },
140 { "seat", cmd_seat }, 140 { "seat", cmd_seat },
141 { "set", cmd_set },
141}; 142};
142 143
143static int handler_compare(const void *_a, const void *_b) { 144static int handler_compare(const void *_a, const void *_b) {
@@ -290,7 +291,7 @@ struct cmd_results *config_command(char *exec, enum cmd_status block) {
290 int i; 291 int i;
291 // Var replacement, for all but first argument of set 292 // Var replacement, for all but first argument of set
292 // TODO commands 293 // TODO commands
293 for (i = /*handler->handle == cmd_set ? 2 :*/ 1; i < argc; ++i) { 294 for (i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) {
294 argv[i] = do_var_replacement(argv[i]); 295 argv[i] = do_var_replacement(argv[i]);
295 unescape_string(argv[i]); 296 unescape_string(argv[i]);
296 } 297 }