From 53fc8bc134402948c0f8c383a14cb1db0d07ffa6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 8 Aug 2020 13:36:27 +0200 Subject: [PATCH] i3: Fix program autostart script Fixes timer calculation in autostart script. Makes autostart script slightly more resilient, checking for timeout time limit *or greater*. --- i3/.config/i3/scripts/i3-applications-autostart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i3/.config/i3/scripts/i3-applications-autostart b/i3/.config/i3/scripts/i3-applications-autostart index 2ce3e33..70857a1 100755 --- a/i3/.config/i3/scripts/i3-applications-autostart +++ b/i3/.config/i3/scripts/i3-applications-autostart @@ -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