mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-23 21:01:58 +00:00
Fix for OS X when no window id is returned (like on the desktop)
This commit is contained in:
parent
cbec1d77b2
commit
98fc8dd91a
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ currentWindowId () {
|
|||
if hash notify-send 2>/dev/null; then #ubuntu!
|
||||
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
|
||||
osascript -e 'tell application (path to frontmost application as text) to id of front window' 2&> /dev/null || echo "0"
|
||||
else
|
||||
echo $EPOCHSECONDS #fallback for windows
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue