Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support source option for additional config files #33

Open
rdvm opened this issue Mar 10, 2024 · 2 comments
Open

[Feature] Support source option for additional config files #33

rdvm opened this issue Mar 10, 2024 · 2 comments

Comments

@rdvm
Copy link

rdvm commented Mar 10, 2024

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 !

@Rabcor
Copy link

Rabcor commented Apr 23, 2024

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.

@BinaryInk
Copy link

Throwing my hat in the ring for this feature. Adding my additional reasons from #90 (duplicate, closed).


  1. 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).

  2. This is supported behavior in hyprland.conf. It would stand to reason that one could expect this behavior in hyprland's other optional daemons.

  3. 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.

  4. 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants