From d75ab17af1462f9c062724e9dd0d3017e91ce7e7 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Tue, 26 May 2020 16:29:17 +0100 Subject: [PATCH] bin/wakey.sh: Treat a zero `active window' as being some foreign thing. Organization: Straylight/Edgeware From: Mark Wooding `xpra' reports a window outside of its session as having id `0' But `xwininfo' treats this as a request to choose a window interactively, which is not what we want. --- bin/wakey.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/wakey.sh b/bin/wakey.sh index bab1cdf..dc46b18 100644 --- a/bin/wakey.sh +++ b/bin/wakey.sh @@ -34,6 +34,8 @@ __wakey_precmd () { win=$(xprop -root _NET_ACTIVE_WINDOW | sed 's/^.*[#=] //') if [[ $win = *"not found." ]] || (( win == WINDOWID )); then suppress=t + elif (( win == 0 )); then + : else for i in $(xwininfo -tree -id $win 2>/dev/null | sed -n '/^ *[0-9]\+ child\(ren\)\?[.:]$/,$ { -- [mdw]