cbec1d77b2b238eadcdad5d926339d4a034240e9
- Author
- Tim O'Brien <timo@t413.com>
- Committer
- Tim O'Brien <timo@t413.com>
- Date
Message
Add window ID fallback for windows.
- maybe someday use GetForegroundWindow() from User32.lib ...
Diff
1diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh
2index 722213734fee328d941dbdda4ad884adfb5f03dc..f3cf0e3b81ce1f97797472c595f98cd5348ee5da 100755
3--- a/plugins/bgnotify/bgnotify.plugin.zsh
4+++ b/plugins/bgnotify/bgnotify.plugin.zsh
5@@ -25,6 +25,8 @@ currentWindowId () {
6 xprop -root | awk '/NET_ACTIVE_WINDOW/ { print $5; exit }'
7 elif hash osascript 2>/dev/null; then #osx
8 osascript -e 'tell application (path to frontmost application as text) to id of front window' 2&> /dev/null
9+ else
10+ echo $EPOCHSECONDS #fallback for windows
11 fi
12 }
13