Open ghost opened 1 year ago
Probably related to: https://github.com/elkowar/eww/issues/715
I see. Hopefully at some point this is addressed. I've been scripting with Haskell over the last while and I've basically learned that anywhere a Haskell script is called, it will fail some % of the time with a timeout warning in the logs. It's not fixable with the :timeout property, and it doesn't require spamming whatever the thing is that launches the script (button, input, etc) to make the error happen. It just seems to be a statistical inevitability. It's a bit frustrating because no matter how good I get things looking, they won't behave reliably if they for ex need user input (which will require running a script). It doesn't matter in cases where the script is run via polling (maybe it's also failing some amount of the time when run like this, but since the polling happens regularly enough it's not noticed). So really the issue becomes apparent with scripts that need to work everytime (like workspace switching script, or in the case of this thread crypto switching script), not so much with polling scripts.
For now, I'd suggest appending a &
to your command like this: your/script.sh &
. This will run the command in the background, which effectively nullifies eww's timeout limit.
Checklist before submitting an issue
Description of the bug
I have a liitle crypto widget which calls a script to update the logo and price variables, thereby changing the current crypto in the widget:
The script works fine if called directly from the command line (even if called repeatedly), but fails maybe 50% of the time when called through clicking the eventbox. I should mention that I have ruled out the API rate-limit being the issue.
Here is the .yuck for the widget:
And here is the .hs for the script:
The logs show this in the ~50% of cases where clicking the event box does not change the crypto (the rest of the time it works with no log output):
Reproducing the issue
You could spin up my config locally to reproduce the issue: https://gitlab.com/IsaacBrown92/dotfiles/-/tree/main/home-manager/modules/eww/config
Expected behaviour
Crypto widget should flip seamlessly between cryptos on click (unless API rate limit is hit).
Additional context
No response