summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTim O'Brien <timo@t413.com>2014-11-07 10:57:02 -0800
committerTim O'Brien <timo@t413.com>2014-11-07 10:58:11 -0800
commitcbec1d77b2b238eadcdad5d926339d4a034240e9 (patch)
tree21e6ce7f020e3a9da60846f4b496ea823b2e11a0 /plugins
parent3d376bbd5b0a230e9e1a2d5497623d92ec94615e (diff)
downloadzsh-cbec1d77b2b238eadcdad5d926339d4a034240e9.tar.gz
zsh-cbec1d77b2b238eadcdad5d926339d4a034240e9.tar.bz2
zsh-cbec1d77b2b238eadcdad5d926339d4a034240e9.zip
Add window ID fallback for windows.
- maybe someday use GetForegroundWindow() from User32.lib ...
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/bgnotify/bgnotify.plugin.zsh2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh
index 722213734..f3cf0e3b8 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
}