karlstav / cava

Cross-platform Audio Visualizer
MIT License
3.92k stars 225 forks source link

config. getenv variables #565

Closed LukashonakV closed 1 month ago

LukashonakV commented 1 month ago

HI @karlstav , this MR covers cases when 3-rd party applications provide configPath (see Waybar user - Alexays/Waybar#3276). Users want to keep environment variables in config. I think it's useful to extend config.c functionality to expand user environment variables. Such code tries to expand user environment variables which are started with $ character (such as $HOME, $XDG_CONFIG_HOME, etc.)

karlstav commented 1 month ago

not really sure about this one @LukashonakV, cava is a terminal application meant to be run in a shell and environment variables will already be expanded by the shell. If cava is wrapped into something else, then the expansion of the variables should probably be done elsewhere.