srithon / kmonadx

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

Add support for contextual compile-time variables #3

Open srithon opened 2 years ago

srithon commented 2 years ago

At times, it would be nice to be able to refer to the environment of an alias or a key. One prominent example used in target_tutorial.kbdx is the &layer variable, which would resolve to the name of the layer within which an alias or key is defined. It could also be convenient to have an &key variable, which resolved to the key being mapped.

[some-layer]
[[private]]
exit-layer = (layer-rem &layer)