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\)\?[.:]$/,$ {
*) icon=dialog-warning head="Command FAILED (rc = $rc)" ;;
esac
cmd=${__wakey_cmd//&/&}; cmd=${cmd//</<}; cmd=${cmd//>/>}
+ case ${SSH_CONNECTION+t} in t) head="[$HOST] $head" ;; esac
notify-send -c Wakey -i $icon -t 5000 "$head" "$cmd"
+ ;;
esac
__wakey_start=nil
;;
esac
}
-case ${DISPLAY+t},${WINDOWID+t},${__mdw_precmd_hook+t},${mdw__preexec_hook+t} in
+case ${DISPLAY+t},${WINDOWID+t},${__mdw_precmd_hook+t},${__mdw_preexec_hook+t} in
t,t,t,t)
if __mdw_programp notify-send; then
__mdw_addhook __mdw_preexec_hook __wakey_preexec