1
0
Fork 0

yabai: do not run workaround if QL windows exist on display

This commit is contained in:
Daniel Kempkens 2024-03-13 10:07:56 +01:00
parent 683415d997
commit d6a0818555
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -46,10 +46,14 @@ let
app_display=$(${yabai-bin} -m query --windows --window $YABAI_WINDOW_ID | ${jq-bin} '.display') app_display=$(${yabai-bin} -m query --windows --window $YABAI_WINDOW_ID | ${jq-bin} '.display')
[ -z "$app_display" ] && app_display=$(${yabai-bin} -m query --displays --display mouse | ${jq-bin} '.index') [ -z "$app_display" ] && app_display=$(${yabai-bin} -m query --displays --display mouse | ${jq-bin} '.index')
if [ $app_display -eq 1 ]; then ql_windows=$(${yabai-bin} -m query --windows --display $app_display | ${jq-bin} 'map(select(.subrole == "Quick Look")) | length')
${yabai-bin} -m display --focus next && yabai -m display --focus prev
else if [ $ql_windows -eq 0 ]; then
${yabai-bin} -m display --focus prev && yabai -m display --focus next if [ $app_display -eq 1 ]; then
${yabai-bin} -m display --focus next && yabai -m display --focus prev
else
${yabai-bin} -m display --focus prev && yabai -m display --focus next
fi
fi fi
''; '';
in in