浏览代码

Add window ID fallback for windows.

- maybe someday use GetForegroundWindow() from User32.lib ...
Tim O'Brien 10 年之前
父节点
当前提交
cbec1d77b2
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      plugins/bgnotify/bgnotify.plugin.zsh

+ 2 - 0
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
 }