srithon / kmonadx

A concise and expressive extension language for configuring KMonad
GNU General Public License v3.0
11 stars 0 forks source link

Support variable interpolation in buttons #4

Closed srithon closed 2 years ago

srithon commented 2 years ago

The parser currently supports all types as rvalues, but the compiler only allows buttons outside of the [configuration] table. It would be really convenient if we could define variables and use them in buttons, like so:

[aliases]
tap-hold-delay = 250

[some-layer]
[[public]]
l = (tap-hold-next-release $tap-hold-delay @leader_next lmet)

The interpolation syntax itself is yet to be decided; should it be &tap-hold-delay to disambiguate from shell variable interpolation?