Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Allow use of environment variables when sourcing files

Open adamnejm opened this issue 2 years ago • 2 comments

source = ~/.config/hypr/binds.conf works source = $XDG_CONFIG_HOME/hypr/binds.conf errors

We can already use environment variables with exec, having it in source would be noice.

adamnejm avatar Jan 22 '23 21:01 adamnejm

http://wiki.hyprland.org/Configuring/Keywords/#defining-variables Wouldn't the syntax break this?

JustSimplyKyle avatar Jan 23 '23 03:01 JustSimplyKyle

How about just importing the environment as Hyprland variables on init?

This wouldn't break anything as re-defining variables would simply override the value.

Could also prove really useful for other (future) stuff that you may wanna pass some environment variable to, without having to open a shell.

adamnejm avatar Jan 23 '23 07:01 adamnejm

In Sway, to include workstation specific config, I'd use:

include $HOME/.config/sway/`hostname`/*

I'd expect the Hyprland version to be something like:

source=~/.config/hypr/workstations/`hostname`/before.conf

Is this possible in Hyprland? Been looking for a way, either via the init script or variable substitution, but can't see anything, and none of the usual syntax's seem to be working.

mewejo avatar Feb 11 '23 09:02 mewejo

done in b03c8970e698312e237fe176ee2654e819c5c202

vaxerski avatar Mar 05 '23 14:03 vaxerski