From: Mark Wooding Date: Wed, 22 Apr 2020 21:04:31 +0000 (+0100) Subject: bin/wakey.sh: Don't vomit at the terminal if the active window is dead. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/21ded11fd836d1a4133c221a22b5a8f11e0fcfa9 bin/wakey.sh: Don't vomit at the terminal if the active window is dead. I don't care about the error here: if `xwininfo' fails, then all that happens is that I miss some (or all) of the window-ids, which is fine by me. In particular, if this happens with the terminal window, then I've got nothing to complain into anyway. --- diff --git a/bin/wakey.sh b/bin/wakey.sh index 1a1aab2..9a05258 100644 --- a/bin/wakey.sh +++ b/bin/wakey.sh @@ -35,7 +35,7 @@ __wakey_precmd () { if (( win == WINDOWID )); then suppress=t else - for i in $(xwininfo -tree -id $win | + for i in $(xwininfo -tree -id $win 2>/dev/null | sed -n '/^ *[0-9]\+ child\(ren\)\?[.:]$/,$ { /^ *\(0x[0-9a-f]\+\) (.*$/s//\1/p }')