From cbec1d77b2b238eadcdad5d926339d4a034240e9 Mon Sep 17 00:00:00 2001 From: Tim O'Brien Date: Fri, 7 Nov 2014 10:57:02 -0800 Subject: [PATCH] Add window ID fallback for windows. - maybe someday use GetForegroundWindow() from User32.lib ... --- plugins/bgnotify/bgnotify.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index 72221373..f3cf0e3b 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -25,6 +25,8 @@ currentWindowId () { 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 + else + echo $EPOCHSECONDS #fallback for windows fi }