i3: Fix program autostart script

Fixes timer calculation in autostart script.

Makes autostart script slightly more resilient, checking for timeout
time limit *or greater*.
This commit is contained in:
Marty Oehme 2020-08-08 13:36:27 +02:00
parent 219f9a912d
commit 53fc8bc134
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A

View file

@ -8,11 +8,11 @@ wait_for_program() {
if xdotool search --onlyvisible --pid $! 2>/dev/null; then
break
else
if [ $n -eq 200 ]; then
notify-send -u critical "Error during start: last program $! did not started fast enough"
if [ $n -gt 200 ]; then
notify-send -u critical "Error during start: last program $! did not start fast enough"
break
else
n=$($n + 1)
n=$((n + 1))
sleep 0.1
fi
fi