From 21ded11fd836d1a4133c221a22b5a8f11e0fcfa9 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Wed, 22 Apr 2020 22:04:31 +0100 Subject: [PATCH] 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. --- bin/wakey.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }') -- 2.11.0