200 loops just in case
This commit is contained in:
parent
7ce3f490d7
commit
b732d846b0
|
@ -15,18 +15,19 @@ get_window_id () {
|
|||
}
|
||||
|
||||
telegram-desktop
|
||||
xdotool key alt+7
|
||||
|
||||
telegram_id="$(pgrep Telegram)"
|
||||
|
||||
window_id="$(get_window_id "$telegram_id")"
|
||||
|
||||
|
||||
while true
|
||||
i=0
|
||||
while [ "$i" -lt 200 ]
|
||||
do
|
||||
correct="$(xprop -id "$window_id" | grep "window state: Normal")"
|
||||
|
||||
[ -n "$correct" ] && break
|
||||
[ -n "$correct" ] && break || i="$(( $i + 1))"
|
||||
done
|
||||
|
||||
xdotool key Return
|
||||
if [ "$i" -lt 200 ]; then
|
||||
xdotool key alt+7 && xdotool key Return
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue