chiark / gitweb /
bin/wakey.sh: Cope if `_NET_ACTIVE_WINDOW' is `CARDINAL' rather than `WINDOW'.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 26 May 2020 15:28:12 +0000 (16:28 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 26 May 2020 15:28:12 +0000 (16:28 +0100)
Helpfully, `xprop' shows the value in an entirely different way in that
case.  And `xpra' uses `CARDINAL'.

bin/wakey.sh

index 469b3cfb1046392e92646937089644f795347935..bab1cdf160357ff39da96bee52d4b8746a58e181 100644 (file)
@@ -31,7 +31,7 @@ __wakey_precmd () {
        case $IGNORE_WINDOW_CHECK in
          t) ;;
          *)
-           win=$(xprop -root _NET_ACTIVE_WINDOW | sed 's/^.*# //')
+           win=$(xprop -root _NET_ACTIVE_WINDOW | sed 's/^.*[#=] //')
            if [[ $win = *"not found." ]] || (( win == WINDOWID )); then
              suppress=t
            else