mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 20:29:45 +01:00
parent
e6a1db213d
commit
18073af622
1 changed files with 2 additions and 2 deletions
|
@ -63,10 +63,10 @@ function bgnotify_appid {
|
|||
if (( ${+commands[osascript]} )); then
|
||||
# output is "app ID, window ID" (com.googlecode.iterm2, 116)
|
||||
osascript -e 'tell application (path to frontmost application as text) to get the {id, id of front window}' 2>/dev/null
|
||||
elif [[ -n $WAYLAND_DISPLAY && ${+commands[swaymsg]} && ${+commands[jq]} ]]; then # wayland+sway
|
||||
elif [[ -n $WAYLAND_DISPLAY ]] && (( ${+commands[swaymsg]} )) && (( ${+commands[jq]} )); then # wayland+sway
|
||||
# output is "app_id, container id" (Alacritty, 1694)
|
||||
swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true) | {app_id, id} | join(", ")'
|
||||
elif [[ -n $DISPLAY && ${+commands[xprop]} ]]; then
|
||||
elif [[ -n $DISPLAY ]] && (( ${+commands[xprop]} )); then
|
||||
xprop -root _NET_ACTIVE_WINDOW 2>/dev/null | cut -d' ' -f5
|
||||
else
|
||||
echo $EPOCHSECONDS
|
||||
|
|
Loading…
Reference in a new issue