aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-06-07 19:29:26 +0100
committerLibravatar GitHub <noreply@github.com>2018-06-07 19:29:26 +0100
commit07bee8cffe60b4a23ddd637461d8290f25f99be2 (patch)
treee3174539676a876ee882e72af579ba9e63e468e6 /sway/config.c
parentMerge pull request #2108 from RedSoxFan/store-outputs (diff)
parentFix logic issue in do_var_replacement (diff)
downloadsway-07bee8cffe60b4a23ddd637461d8290f25f99be2.tar.gz
sway-07bee8cffe60b4a23ddd637461d8290f25f99be2.tar.zst
sway-07bee8cffe60b4a23ddd637461d8290f25f99be2.zip
Merge pull request #2084 from RedSoxFan/runtime-var-expansion
Runtime variable expansion
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..0e41df04 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -657,6 +657,14 @@ char *do_var_replacement(char *str) {
657 continue; 657 continue;
658 } 658 }
659 } 659 }
660 // Unescape double $ and move on
661 if (find[1] == '$') {
662 size_t length = strlen(find + 1);
663 strncpy(find, find + 1, length);
664 find[length] = '\0';
665 ++find;
666 continue;
667 }
660 // Find matching variable 668 // Find matching variable
661 for (i = 0; i < config->symbols->length; ++i) { 669 for (i = 0; i < config->symbols->length; ++i) {
662 struct sway_variable *var = config->symbols->items[i]; 670 struct sway_variable *var = config->symbols->items[i];