yabai: do not run workaround if QL windows exist on display
This commit is contained in:
parent
683415d997
commit
d6a0818555
1 changed files with 8 additions and 4 deletions
|
@ -46,11 +46,15 @@ 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')
|
||||||
|
|
||||||
|
ql_windows=$(${yabai-bin} -m query --windows --display $app_display | ${jq-bin} 'map(select(.subrole == "Quick Look")) | length')
|
||||||
|
|
||||||
|
if [ $ql_windows -eq 0 ]; then
|
||||||
if [ $app_display -eq 1 ]; then
|
if [ $app_display -eq 1 ]; then
|
||||||
${yabai-bin} -m display --focus next && yabai -m display --focus prev
|
${yabai-bin} -m display --focus next && yabai -m display --focus prev
|
||||||
else
|
else
|
||||||
${yabai-bin} -m display --focus prev && yabai -m display --focus next
|
${yabai-bin} -m display --focus prev && yabai -m display --focus next
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue