Scope checklist
Problem
I wanted to use notify-send to provide some visual feedback on layout/submap changes, so I wrote a couple of scripts for QoL -- but then I need to make my binding something like "Mod+W" = "spawn:bash -c 'umbriel msg workspace-set-layout:toggle && MY_SCRIPT'" to actually run the script on the keybinding. This I was happy with, but when I got to setting up the same thing for submaps, I realized I was better off using "submap[test],X" = bash -c 'umbriel msg ACTION && umbriel msg submap:reset && MY_SCRIPT' than using the built-in submap key for the binding.
What you already tried
I can definitely get the behavior I want if I essentially just write a bash script in my config, but I don't imagine I'm the only one who would want a feature like this & thought it was worth asking.
Area
Configuration
Proposed behavior
See this draft PR for a proof-of-concept. I think it is probably sufficient to keep the same behavior on the basic "BINDING" = "ACTION" syntax, but for the more advanced key-value syntax something like "BINDING" = { action = ["ACTION1", "ACTION2", ...], repeat = false, ... } could be nice & would really expand what is possible within configuration without falling back on external tools like bash.
Scope fit
As above, it's very possible now to get this behavior with e.g., a multi-line string embedding a bash script into the config; it simply feels clunky to me, and bloats the file size.
Prior art and references
In i3/sway, for instance, it's very possible to bind a series of commands to one keybinding using semicolons like so:
# Mark focused container for swap
bindsym $mod+Shift+m [con_mark="^swap-target$"] unmark "swap-target";\
mark --add "swap-target";\
exec notify-send -t 1500 "Marked for swap"
# Swap the containers
bindsym $mod+Shift+g swap container with mark "swap-target";\
[con_mark="^swap-target$"] unmark "swap-target"
The apparent way to translate that concept to toml is by using an array of command strings.
Participation
Additional context
I'm happy to continue testing & refining my PR when I have free time, but I'm very open to suggestions on how to approach it / what would create the least friction for future maintenance.
Scope checklist
examples/config.toml, and this is not already possible with configuration, window or layer rules, keybinds, submaps, orumbriel msg.umbriel msgcannot do it.Problem
I wanted to use
notify-sendto provide some visual feedback on layout/submap changes, so I wrote a couple of scripts for QoL -- but then I need to make my binding something like"Mod+W" = "spawn:bash -c 'umbriel msg workspace-set-layout:toggle && MY_SCRIPT'"to actually run the script on the keybinding. This I was happy with, but when I got to setting up the same thing for submaps, I realized I was better off using"submap[test],X" = bash -c 'umbriel msg ACTION && umbriel msg submap:reset && MY_SCRIPT'than using the built-insubmapkey for the binding.What you already tried
I can definitely get the behavior I want if I essentially just write a bash script in my config, but I don't imagine I'm the only one who would want a feature like this & thought it was worth asking.
Area
Configuration
Proposed behavior
See this draft PR for a proof-of-concept. I think it is probably sufficient to keep the same behavior on the basic
"BINDING" = "ACTION"syntax, but for the more advanced key-value syntax something like"BINDING" = { action = ["ACTION1", "ACTION2", ...], repeat = false, ... }could be nice & would really expand what is possible within configuration without falling back on external tools like bash.Scope fit
As above, it's very possible now to get this behavior with e.g., a multi-line string embedding a bash script into the config; it simply feels clunky to me, and bloats the file size.
Prior art and references
In i3/sway, for instance, it's very possible to bind a series of commands to one keybinding using semicolons like so:
The apparent way to translate that concept to toml is by using an array of command strings.
Participation
Additional context
I'm happy to continue testing & refining my PR when I have free time, but I'm very open to suggestions on how to approach it / what would create the least friction for future maintenance.