Open MartyMcFlyInTheSky opened 2 months ago
Why not just pass all the needed data as command line arguments?
I mean sure, but also why not have them as environmental variables? It would decrease the verbosity and make it more clean imho. As a user I was also quite surprised that this doesn't work, which goes against the principle of least astonishment.
Fair enough. As it turns out, there's not way to access variables in defvar
, defpoll
and deflisten
, so there is no way to pass them now. If we were able to do that, we could just pass the needed variables as command line arguments or just set the environmental variables ourselves. Having all magic variables set by default at all times seems kind of excessive, you realistically need one or two. Maybe the access to variables in defvar
can be made possible
Yes that should be supported at least. Even though I think that exporting 10 variables is not all that excessive, one could export just a subset. I mean for the other variables it might not even make sense to be exported, but EWW_CMD
has a real use case.
Description of the requested feature
When executing a script from yuck, e.g.
populate its environment with the magic variables beforehand so the script can make use of them. E.g. in my python script I want to do the following:
This will allow to guard against cases where eww is invoked with a specific configuration file (eww --config ...) as described in the docs (if I understood correctly this is why the ${EWW_CMD} variable exists in yuck?).
Proposed configuration syntax
internal
Additional context
No response