From 0c55d42480e5edb9047fc08876f175161f06079c Mon Sep 17 00:00:00 2001 From: duerrp Date: Fri, 24 Apr 2015 12:39:00 +0900 Subject: [PATCH] Fix currentWindowId On my system xmonad on Ubuntu 14.04, the xprop -root call has an earlier ocurence of NET_ACTIVE_WINDOW that makes this function fail. I guess someone who knows more about xprop should rewrite this function in a less brittle way, but for now my fix should do. --- 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 14ca4c817..e89209be6 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -23,7 +23,7 @@ currentWindowId () { if 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 || echo "0" elif hash notify-send 2>/dev/null; then #ubuntu! - xprop -root | awk '/NET_ACTIVE_WINDOW/ { print $5; exit }' + xprop -root | awk '/^_NET_ACTIVE_WINDOW/ { print $5; exit }' else echo $EPOCHSECONDS #fallback for windows fi