mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
Add window ID fallback for windows.
- maybe someday use GetForegroundWindow() from User32.lib ...
This commit is contained in:
parent
3d376bbd5b
commit
cbec1d77b2
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue