aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2018-06-04 22:24:34 -0400
committerBrian Ashworth <bosrsf04@gmail.com>2018-06-05 10:08:00 -0400
commit067fe9d0472ca24328a962e8704d4e843f2a8af1 (patch)
tree2ea56856183e855ca2681834d21516b2c2351341 /sway/config.c
parent0f715470328cbb5be77f95c7e209ce6bace2ef19 (diff)
Support runtime var expansion and set at runtime
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c
index 445c3d55..f382eefa 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -657,6 +657,14 @@ char *do_var_replacement(char *str) {
continue;
}
}
+ // Unescape double $ and move on
+ if (find[1] == '$') {
+ size_t length = strlen(find + 1);
+ strncpy(find, find + 1, length);
+ find[length] = '\0';
+ find += 2;
+ continue;
+ }
// Find matching variable
for (i = 0; i < config->symbols->length; ++i) {
struct sway_variable *var = config->symbols->items[i];