koekeishiya / yabai

A tiling window manager for macOS based on binary space partitioning
MIT License
24.2k stars 645 forks source link

1password Show Quick Access will trigger window_destroyed signal #1492

Closed jheroy closed 9 months ago

jheroy commented 2 years ago

I use

yabai -m signal --add event=window_destroyed action="~/.config/yabai/auto_focus_last.sh"

to foucs last used window after current window was destroyed, but when I open 1passowd Quick access, it will prompt a touchID popup window, but also trigger a window_destroyed signal which will change the focus, so I can't use my touchID to unlock 1password.

my auto_focus_last.sh

focusId=$(yabai -m query --windows --space | jq -r '.[]|select(."has-focus" == true)'|jq '.id')
if [[ "$focusId" != "" ]];then
        exit 0
fi

id=$(yabai -m query --windows --space | jq .[0].id)
yabai -m window --focus $id
koekeishiya commented 9 months ago

Might be resolved in latest version.