chiark / gitweb /
bin/disorder-notify: Rewrite and take over the functionality of `media-keys'.
[profile] / bin / wakey.sh
index c11aef5659e522d430de2d058cf8a74d19ca9c40..dc46b18db3bde8095f2c2f22c99c6a83c1c596db 100644 (file)
@@ -31,9 +31,11 @@ __wakey_precmd () {
        case $IGNORE_WINDOW_CHECK in
          t) ;;
          *)
-           win=$(xprop -root _NET_ACTIVE_WINDOW | sed 's/^.*# //')
-           if (( win == WINDOWID )); then
+           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\)\?[.:]$/,$ {