From 98fc8dd91adb5e8754b857127c4d121871d5fadb Mon Sep 17 00:00:00 2001 From: Tim O'Brien Date: Sat, 8 Nov 2014 14:16:56 -0800 Subject: [PATCH] Fix for OS X when no window id is returned (like on the desktop) --- plugins/bgnotify/bgnotify.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index f3cf0e3b8..259d27424 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -24,7 +24,7 @@ currentWindowId () { if hash notify-send 2>/dev/null; then #ubuntu! xprop -root | awk '/NET_ACTIVE_WINDOW/ { print $5; exit }' elif hash osascript 2>/dev/null; then #osx - osascript -e 'tell application (path to frontmost application as text) to id of front window' 2&> /dev/null + osascript -e 'tell application (path to frontmost application as text) to id of front window' 2&> /dev/null || echo "0" else echo $EPOCHSECONDS #fallback for windows fi