aboutsummaryrefslogtreecommitdiff
path: root/sway.desktop
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2018-10-25 12:58:05 -0400
committerBrian Ashworth <bosrsf04@gmail.com>2018-11-10 21:53:10 -0500
commitb27700060196cb41df1180f51a3d7a254a97fd27 (patch)
treece2f52dfe9b7c1b69df89aad8e6680e00be35b72 /sway.desktop
parent80a1c340a9c8c8aac5fe4dd7bc1dc15b43fce0dc (diff)
Alter config variable replacement process
Currently, variables cannot contain commands and cannot span more than one argument. This is due to variable replacement happening after determining the handler and after splitting the config line into arguments. This changes the process to: 0. Check for empty lines and block boundaries 1. Split the arguments as before 2. Verify that the first argument is not a variable. If needed the following occurs a. Perform variable replacement on just the first argument b. Join the arguments back together then split the arguments again. This is needed when the variable contains the command and arguments for the command. 3. Determine the handler 4. If the handler is cmd_set, escape the variable name so that it does not get replaced 5. Join the arguments back together, do variable replacement on the full command, and split the arguments again 6. Perform any needed quote stripping or unescaping on arguments 7. Run the command handler This allows for config snippets such as: ``` set $super bindsym Mod4 $super+a exec some-command ``` and ``` set $bg bg #ffffff solid_color output * $bg ```
Diffstat (limited to 'sway.desktop')
0 files changed, 0 insertions, 0 deletions