Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

global config file?

Open quantenzitrone opened this issue 2 years ago • 3 comments

What do you guys think about a global config file directory like $XDG_CONFIG_DIRS/hypr and /etc/xdg/hypr as fallback for all hypr related stuff?

Having a system-wide configuration file is actually part of the xdg base directory specification.

$XDG_CONFIG_DIRS defines the preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory. The directories in $XDG_CONFIG_DIRS should be seperated with a colon ':'.

Another benefit would that NixOSers wouldn't have to use home-manager to configure Hyprland from their configuration.nix.

quantenzitrone avatar Nov 18 '22 02:11 quantenzitrone

@fufexan kowalski, analysis

vaxerski avatar Nov 18 '22 10:11 vaxerski

You don't need HM to configure Hyprland. It'll create a config file if ~/.config/hypr/hyprland.conf doesn't exist. You can then modify that as usual.

I'm not opposed to this change but using HM and having this be done are orthogonal.

fufexan avatar Nov 18 '22 11:11 fufexan

You need home manager to place config files reproducably in your home directory. For global config files, you can use environment.etc.

quantenzitrone avatar Nov 19 '22 23:11 quantenzitrone

Can I close this? Hyprland auto-generates a config file, which you do not need to manage with Home Manager.

fufexan avatar Feb 18 '23 23:02 fufexan

I don't see how configuration file auto generation solves this. To change the configuration globally, one would need to recompile the changed nix expression every time and even then Hyprland would only use the new global config, if i delete the old one. Yes, i can have editable configuration files floating around in my XDG_CONFIG_HOME, which i don't need home-manager to manage. But if i want to include my Hyprland config in my reproducible NixOS config repository, I would either need home-manager, or a global config file.

quantenzitrone avatar Feb 18 '23 23:02 quantenzitrone

Also, I don't see this as a NixOS only issue, because a global config file is something that could concern people on other distros too.

quantenzitrone avatar Feb 18 '23 23:02 quantenzitrone

A solution until this is properly taken care of would be to write your config to /etc/xdg/hyprland.conf and starting hyprland with Hyprland -c /etc/xdg/hyprland.conf.

I don't know when I will have time, but I'll try to implement this.

fufexan avatar Feb 18 '23 23:02 fufexan

Yeah, i gotta be honest, I've gone back to i3 at the moment, but thanks

quantenzitrone avatar Feb 19 '23 00:02 quantenzitrone

@Quantenzitrone this issue should be closed or?

romanstingler avatar Aug 03 '23 19:08 romanstingler

idk, not supporting the full xdg base directory specification is still not fixed, right?

quantenzitrone avatar Aug 03 '23 19:08 quantenzitrone