eww
eww copied to clipboard
[BUG] Bash scripts timeout if they sleep
Checklist before submitting an issue
- [X] I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
- [X] I have specifically verified that this bug is not a common user error
- [X] I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)
Description of the bug
ERROR eww::widgets > WARNING: command /bin/bash -c "scripts/popup spt false" timed out
This occurs if my script sleeps for more than 0.1 seconds (when the script is called from an eventbox in eww with a timeout well over the sleep period).
Reproducing the issue
#!/bin/bash
spt() {
LOCK_FILE="/tmp/eww/spt_dashboard.lock"
EWW_BIN="/usr/bin/eww"
if [[ $1 == false ]]; then
${EWW_BIN} -c "$HOME/.config/eww" update spt_spawn="$1"
sleep 0.5
${EWW_BIN} -c "$HOME/.config/eww" close spt
rm "$LOCK_FILE"
else
${EWW_BIN} -c "$HOME/.config/eww" open spt
touch "$LOCK_FILE"
${EWW_BIN} -c "$HOME/.config/eww" update spt_spawn="$1"
fi
}
if [[ "$1" = "spt" ]]; then
spt "$2"
fi
run this script, where spt_spawn is a boolean tied to a reveler for a whole window. the point is to wait out the animation.
Expected behaviour
The window should fade away then close.
Additional context
No response
try calling the script but with an ampersand at the end, e.g. :onclick "./scripts/script &" :)