[Suggestion]: Resolve paths in command arguments
Using the following code:
${execpi 1800 curl -o /home/$USER/.conky/weather.png https://wttr.in/77386_0.png?transparency=255&background=000000}
${image /home/$USER/.conky/weather.png -p 25,600 -n}
The first line properly saves weather.png to the proper directory. The second line results in a "conky: Unable to load image '/home/$USER/.conky/weather.png'" error.
I have to put my user name rather than the $USER variable.
${image /home/owner/.conky/weather.png -p 25,600 -n}
Then it works just fine.
Can the devs please fix it so ${image} works with $USER, to make the code more portable?
An immediate workaround is to run Conky with a working directory of your home directory and use relative paths.
It isn't trivial, and in most contexts isn't expected, to expand shell variables in any location paths occur. Shell variable expansion may involve various kinds of string substitution (e.g. ${foo/bar/baz}), command execution (${foo/bar/$(pwd)}), etc., and which subset to support isn't an obvious decision. I think it's probably more sane to not try to imitate a shell to expand shell variables in paths, and to instead confine usage of shells to explicit cases like ${execi}.
Could be done by using wordexp on path arguments.
Changing this issue into an enhancement suggestion as path expansion and resolution is nowhere said to be supported (so bug label isn't appropriate).