[Feature] Support `source` option for additional config files
In hyprland.conf I source other config files so I can have some device-specific configurations while sharing most of my config between systems. I'd like to have different idle behavior on my laptop vs. my desktop, so it'd be great if that were an option for hypridle as well.
source=~/.config/hypr/hosts/laptop/hypridle.conf
[ERR] Config has errors:
Config error in file /home/rdvm/dotfiles/hyprland/.config/hypr/hypridle.conf at line 1: config option <source> does not exist.
Thanks for all your work on hyprwm !
yeah this would be great, if only just so you can keep all your power related settings in one config file. There are ways around this but none are pretty.
Alternatively at least for my scenario being able to execute with commandline args instead of a config file (like swayidle) would be neat.
Throwing my hat in the ring for this feature. Adding my additional reasons from #90 (duplicate, closed).
-
This is a common behavior for a plethora of Linux applications. Those that don't support it out of the box typically provide a mechanism (like hyprland itself) to include files (e.g., nginx).
-
This is supported behavior in hyprland.conf. It would stand to reason that one could expect this behavior in hyprland's other optional daemons.
-
Personally, I like being able to separate out different bits of configuration files into their own parts for easier maintenance when possible. I doubt I'm entirely alone on this.
-
Again personally, I use Syncthing to keep my laptop and desktop hyprland configs in sync. Having the source keyword allows me to do the following:
# This file must contain a variable of $hostname.
# This is used to load the machine-specific confs at the end of this script.
# This file should not be synced with Syncthing.
source = ~/.config/hypr/hyprland.conf.d/hostname.conf
...
# Load all loose conf files
source = ~/.config/hypr/hyprland.conf.d/*.conf
# Load machine-specific conf files
source = ~/.config/hypr/hyprland.conf.d/$hostname/*.conf
(I may look into submitting a PR myself if I get around to comparing the code from hyprland and hypridle)