-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Space focusing issues with Sonoma 14.1 (23B74) #1937
Comments
Suspected duplicate of #1936 |
I also thought so, but I don't get this pop-up. Also the payload (which is the code that runs inside the Docker to my understanding) does work for other things like moving a window or changing stacked windows. This is why I believe it is not a duplicate, but we shall see. |
i didn't get that pop-up too. i also thought that it's not a duplicate, because i run |
By the way, if you attempt to switch the focus to the same space you are currently on, you will receive the message 'Cannot focus an already focused space.' However, for any other action, whether it's by label or using the previous/next function, it doesn't work. |
I'm also having the exact same issue. |
I have just upgraded to Sonoma 14.1 and Yabai |
Same issue here |
same issue here |
@koekeishiya, I appreciate your all efforts on this open source. |
same here. no popup with error also |
same here |
I posted a week ago, when I upgraded MacOS to Sonoma 14.0 that I had problems with |
Same problem, Sonoma 14.0 + yabai 6.0.0, and autofocus with the mouse sometimes doesn't work and then strangely it starts working again. The only thing I've noticed is that this problem occurs when the Mac turns on from a Sleep state or similar. |
+1, space switching doesn't work on Sonoma 14.1. When I run
When I use Mac's built in space-switching, that works and Yabai also broadcasts that event:
|
Same issue here |
1 similar comment
Same issue here |
Same issue here on Sonoma 14.1 and yabai 6.0.0. Both |
Same problem (Sonoma 14.1, yabai 6.0.0). But if you're in the space of a second display, switching to the first display works fine (with a space changing animation). |
You can also just remap your skhd to emit another keystroke, I for instance have space switching in MacOS linked to ctrl-left so I can do this:
|
I'm using hammerspoon for key binding, and had Opt+number to switch to a specific space. -- Function to get the active space ID and a table of visible spaces
function getSpaceInfo()
-- Execute the yabai command to fetch the JSON output
local yabaiOutput = hs.execute(yabai_path .. " -m query --spaces")
-- Decode the JSON output to a Lua table
local spaces, decodeError = hs.json.decode(yabaiOutput)
if not spaces then
hs.printf("JSON decode err: %s", decodeError)
return nil, nil
end
local focusedSpace = nil
local visibleSpaces = {}
-- Iterate through the spaces
for _, space in ipairs(spaces) do
if space["has-focus"] == true then
focusedSpace = space
end
if space["is-visible"] == true then
table.insert(visibleSpaces, space)
end
end
return focusedSpace, visibleSpaces
end
function focus_space_id(space_id)
yabai({"-m", "space", "--focus", '' .. space_id})
end
for k,v in pairs({'1', '2', '3', '4', '5', '6', '7', '8', '9', '10'}) do
hs.hotkey.bind({"alt"}, '' .. k % 10, function()
local focusedSpace, visibleSpaces = getSpaceInfo()
if focusedSpace then
local targetDisplay = math.ceil(tonumber(k) / 5)
local currentDisplay = focusedSpace.display
--print("targetDisplay: ", targetDisplay)
--print("currentDisplay: ", currentDisplay)
if targetDisplay == currentDisplay then
-- If the target and current display are the same, focus another space first
for _, space in ipairs(visibleSpaces) do
if space.display ~= currentDisplay then
--print("Focusing space ", space.index, " first")
focus_space_id(space.index)
hs.timer.doAfter(0.05, function()
focus_space_id(k)
end)
return
end
end
end
-- Focus the requested space
focus_space_id(k)
end
end)
end
|
FYI to get the current space you can use You could get the next space up or down by doing All things I used to do when yabai was working for me :P |
@henrythor I hope this is helpful. I changed the animation in System Preferences - Accessibility - Display - Reduce Motion. This is not a complete disabling of the animation, but a change to a fading effect. |
I prefer doing it with as few yabai calls as possible because each call has a slight overhead, which is noticeable if you switch spaces quickly :) |
I added this script and reloaded Hammerspoon but it didn't change space when I pressed |
You need some more functions/code: local json = require("hs.json")
function init_brew(args)
output, status, t, rc = hs.execute("brew --prefix", true)
output = output:gsub("\n", "")
return output
end
yabai_path = brew_path .. "/bin/yabai"
function yabai(args)
--print("yabai args: ", hs.inspect(table.pack(args)))
hs.task.new(yabai_path, nil, function(ud, ...)
--print("stream", hs.inspect(table.pack(...)))
return true
end, args):start()
end I also use the hs.loadSpoon("ReloadConfiguration") The reason I created this |
I have this "native" solution for finding spaces belonging to a display rather than hammerspoon. readonly SPACE_INDEX=$1
readonly ACTIVE_DISPLAY_ID=$(yabai -m query --spaces |
jq '.[] | select(."has-focus" == true).display')
readonly SPACES_OF_ACTIVE_DISPLAY=$(yabai -m query --displays |
jq ".[] | select(.index == $ACTIVE_DISPLAY_ID).spaces")
readonly TARGET_SPACE=$(echo $SPACES_OF_ACTIVE_DISPLAY |
jq -r ".[$SPACE_INDEX]")
yabai -m space --focus $TARGET_SPACE |
It could be a separate issue but it would seem that |
Any updates on 14.1.1? |
Its the same, doesn't work |
Works in version 6.0.1! 🎉 |
Thank you @koekeishiya! |
Yes, can confirm space focus etc work in 6.0.1. Thanks @koekeishiya |
Can confirm here as well. Can we close this issue? |
Everything working great again after latest update. Thanks @koekeishiya! |
Happiness is a fully functioning yabai :-) |
Ignore. I needed to (again) give the necessary system permissions to yabai, after the upgrade. |
Since upgrading to Sonoma 14.1 (build 23B74), there are 2 new issues which I didn't have before (I was on Sonoma 14.0 previously):
yabai -m config window_animation_duration 0.0
. It used to be instant without this as well.Here's my config file:
I also tried installing from HEAD (#40d1075) but this had no effect.
Needless to say, SIP is disabled (everything worked fine on 14.0 for me). Here's the output from
csrutil
:I also enabled debug prints, but nothing was printed when I tried switching spaces.
Let me know if any more information is needed.
The text was updated successfully, but these errors were encountered: