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

Focusing previous space does not work since Big Sur. #747

Closed
SxC97 opened this issue Dec 4, 2020 · 12 comments
Closed

Focusing previous space does not work since Big Sur. #747

SxC97 opened this issue Dec 4, 2020 · 12 comments

Comments

@SxC97
Copy link

SxC97 commented Dec 4, 2020

I am running the latest version of Yabai and SKHD. My .skhdrc file looks like this

# fast focus desktop
ctrl - left : yabai -m space --focus prev || yabai -m space --focus last
ctrl - right : yabai -m space --focus next || yabai -m space --focus first

Hitting ctrl - right works just fine but ctrl - left does not. I already tried

sudo yabai --uninstall-sa
sudo yabai --install-sa
sudo yabai --load-sa

and that did not fix the issue.

@SxC97
Copy link
Author

SxC97 commented Dec 4, 2020

I did some more testing. I changed .skhdrc to

# fast focus desktop
ctrl - right : yabai -m space --focus prev || yabai -m space --focus last
ctrl - left : yabai -m space --focus next || yabai -m space --focus first

and now yabai -m space --focus prev works properly but yabai -m space --focus next does not.

This might be a problem with skhd and the ctrl - left keyboard shortcut.

@PGimenez
Copy link

I'm having the same issue after upgrading to Big Sur. Trying to focus on any desktop with --focus gives this error

cannot focus space due to an error with the scripting-addition.

@SxC97
Copy link
Author

SxC97 commented Dec 12, 2020

I fixed this issue by moving yabai -m space --focus next || yabai -m space --focus first

into a separate shell script called .move_left and .move_right

and having SKHD run that script when the hotkey is pressed. e.g. ctrl - left : ~/.scripts/.move_left.sh

@peppy
Copy link

peppy commented Dec 14, 2020

I'm seemingly seeing a similar issue with focusing based on index:

yabai -m space --focus 2 is no longer working from command link (skhd or otherwise).

Issuing the same command for the current space does return an error as expected, so it's definitely attempting to switch but not succeeding.

@SxC97
Copy link
Author

SxC97 commented Dec 14, 2020

When I try to focus previous space through skhd, either directly or through a separate shell script, it seems to lock up my entire computer and the track pad doesn’t work for a while. It definitely seems like it’s trying to do something but it just isn’t working.

@gasper-vrhovsek
Copy link

gasper-vrhovsek commented Dec 18, 2020

I can confirm. yabai -m space --focus N focuses the space already shown on the display where the desired space N is. For instance, i have two displays with multiple spaces:
d1:[1,2,3,4] d2:[5,6,7,8]
(bold are currently displayed spaces, italics is currently focused space)
If i run
yabai -m space focus 8
it will focus space 5 (space already shown on display d2) instead of the expected space 8.

Also, switching spaces with prev|next works, if the prev or next space is on a different display, but doesn't work for switching among spaces on the same display.

I'm running all commands directly from terminal to eliminate skhd or similar apps.

Edit: can not reproduce these issues on dev build, so i guess it's fixed.

@sluukkonen
Copy link

I'm seemingly seeing a similar issue with focusing based on index:

yabai -m space --focus 2 is no longer working from command link (skhd or otherwise).

Issuing the same command for the current space does return an error as expected, so it's definitely attempting to switch but not succeeding.

This seems to be an issue with the 11.1 update. Switching spaces used to work in 11.0.1.

@simpss
Copy link

simpss commented Dec 18, 2020

Seems to have something to do with the space module/api.

yabai -m space --focus 1 doesn't work
yabai -m space --create doesn't work
yabai -m space --focus prev|next doesn't work

query commands seem to work, labelling works, moving windows between workspaces works. So it's just --create and --focus that don't seem to be working.

The intresting thing is, when I try to focus an already focused workspace. I do get an error. cannot focus an already focused space.

this is on:
OSX 11.1
yabai 3.3.5

@koekeishiya
Copy link
Owner

koekeishiya commented Dec 18, 2020

Not to be rude, but if people either a) read the changelog, b) look at the 7 recent commits to master, or c) look at the last 2 closed issues, you would see why it does not work (on 11.1).

@rockyzhang24
Copy link

rockyzhang24 commented Dec 18, 2020

Exactly. Before posting an issue, try to do some investigation and research. Most probably, a similar issue has already been posted, or it has been solved but not released, or a similar question has already been answered. Look at these #762, #766, #765, #763, they are literally the same, and many of them have been answered. :)

BTW, the dev version will resolve this issue I believe. Here: https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(from-HEAD)

@simpss
Copy link

simpss commented Dec 18, 2020

Sorry if it sounded rude. The issue seems to be the oldest issue and it looked like at-least some debugging was happening here.

I can confirm 3.3.6 works well and has fixed this issue.

@koekeishiya
Copy link
Owner

Fixed in release v3.3.6. Upgrade to the new version:
https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#updating-to-the-latest-release

If you are running Big Sur, read:
https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#macos-big-sur---automatically-load-scripting-addition-on-startup

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

8 participants