include a file based on environment variables such as "include ${HOSTNAME}-font.conf" #6991
-
I am trying to use same kitty.conf for different computers. I have created platform specific files which the common kitty.conf files include. I use a script to generate necessary symbolic links to platform specific files For example in kitty.conf
A script links the ${HOSTNAME}-font.conf to font.conf such as font.conf etc. I really do not want to use a script to do that. Is there a way to that in kitty.conf. I know that What I would like to do is following:
However above command fails. Any help much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
include ${HOSTNAME}.conf
works fine but you need to make sure HOSTNAME is defined in whatever
environment you are running kitty in. In particular setting it in your
shell rc files wont work, since those run *after* kitty starts.
|
Beta Was this translation helpful? Give feedback.
-
Thank you, I have not defined I added a different variable for not messing with the system settings such as I wish such a command |
Beta Was this translation helpful? Give feedback.
-
Also see #811. |
Beta Was this translation helpful? Give feedback.
Just because it isnt in your personal rc files doesnt mean its not in one of the system ones. Allowing command execution in conf files makes parsing and loading config slow and non-static. It isnt really worth the tradeoff. If you really want something like that simply make a wrapper script to run kitty in that script use whatever commands you like to generate your config and either directly pass it to kitty via --config or use --override