yqrashawn / GokuRakuJoudo

config karabiner with ease
GNU General Public License v3.0
1.13k stars 122 forks source link

Use previously defined tempates within templates #202

Open eugenesvk opened 1 year ago

eugenesvk commented 1 year ago

Let's say I've defined a template to show notifications

:templates {
  :say  "osascript -e 'display notification \"%s\" with title \"%s\"'"
;...

But then I'd also like to define a notification with some parameters in advance (for example, some string that is going to be used in several shortcuts

;...
  :sayrepeat [:say  "some long repeated string" "some title"] ; use previously defined :say
; instead of the full command
  :sayrepeat  "osascript -e 'display notification \"some long repeated string\" with title \"some title\"'"
}

Is it possible to use a previously defined template to define subsequent templates?