Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant detect current space after upgrade to yabai #2

Open
soulflyer opened this issue Dec 31, 2021 · 1 comment
Open

Cant detect current space after upgrade to yabai #2

soulflyer opened this issue Dec 31, 2021 · 1 comment

Comments

@soulflyer
Copy link

Yabai version 4 has some breaking changes. One is that the info returned by yabai -m query --spaces specifies the current space by has-focus true rather than focussed 1

Change line 120 of yabai.1d.sh or whatever equivalent file you have installed to the following to fix this:

CURRENT=$(yabai -m query --spaces --display | jq 'map(select(."has-focus" == true))[-1].index')
@soulflyer
Copy link
Author

soulflyer commented Feb 7, 2022

Similarly for the $WINDOW setting that is used to show if a window is floating or managed. Change line 174 from:
WINDOW=$(yabai -m query --windows --window | jq .floating) 2> /dev/null
to:
WINDOW=$(yabai -m query --windows --window | jq '."is-floating"') 2> /dev/null
The subsequent test of the returned value will also need to be changed as it is now true/false not 0/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant