mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00: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
|
if (( ${+commands[osascript]} )); then
|
||||||
# output is "app ID, window ID" (com.googlecode.iterm2, 116)
|
# 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
|
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)
|
# output is "app_id, container id" (Alacritty, 1694)
|
||||||
swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true) | {app_id, id} | join(", ")'
|
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
|
xprop -root _NET_ACTIVE_WINDOW 2>/dev/null | cut -d' ' -f5
|
||||||
else
|
else
|
||||||
echo $EPOCHSECONDS
|
echo $EPOCHSECONDS
|
||||||
|
|
Loading…
Reference in a new issue