Closed haydonryan closed 7 months ago
that should be already working, though?
In bash this works, but in hyprlang it doesn't. I get an error. I've tried a bunch of variations, and there's nothing in the wiki about being able to do this.
what are you using to test this? are you sure $HOSTNAME is set at the time of parsing?
Good point on the $HOSTNAME not being set. I need to do some more testing.
How I tested was I moved the exec-once waybar to the $HOSTNAME.yaml.
What is the correct syntax of hyrpang to use $HOSTNAME? Are there any examples in the wiki / or you can provide.
wdym to use $HOSTNAME?
It has to either be an env var, or be defined with $HOSTNAME = deez nuts
In the hyrlang.conf file - Which line should work?
source=~/.config/hypr/machine-{$HOSTNAME}.conf
source=~/.config/hypr/machine-$HOSTNAME.conf
what? both will work provided the variable is defined - one will put {} around it, the other wont
I'm trying to write a cross machine configuration file so that both my laptop and desktop are able to use the same base hyprland config. My Desktop has a very different keyboard to my laptop, and i need to swap the control and caps lock on the laptop. My Desktop also has multiple monitors, one which is portrait.
What I'm trying to do is use the $HOSTNAME environment variable in the hyperlang config to call machine specific something like the following:
I know it's possible in bash, but would be super awesome if it was possible to do something like this in hyprlang.
The dotfiles are all stored in git repos, and sync'ed via an update script.
Would it be possible to pull in more than a static source file?