-
Notifications
You must be signed in to change notification settings - Fork 586
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
hs.spaces.moveWindowToSpace does not work on macOS 15.0 Sequoia #3698
Comments
It does, if that happens to be the number of the current space. Otherwise it should output On x86 Sonoma 14.7: Using What OS version are you on? |
I can replicate the issue on my OS Logs are,
|
I am currently on 15.0.1 Sequoia but the issue happens since 15.0 (as per the title). Sorry if my logs weren't clear enough. Regardless of whether I was moving it to the current space or not, it will always return
|
I can confirm the same behavior, it is always returning true, still nothing happens. It started after upgrading to Sequoia.
|
They discussed here already. It seems like there's no good option to make it work |
@marcelja Thanks for bringing this to my attention! The comment here #3636 (comment) seems to have done the trick for me. |
I tried to modify provided script to suit my needs, namely moving unfocused window to current space, hack is not sufficient for this behavior, for me it's still open issue. |
I've tried everything as inspired by code here and was unable to make it work. my original config reads
the logs reads
could not figure out what was wrong, it logs everything as expected. any comment is appreciated. |
I was having the same issue. But the API started working again once I did the following
It would be nice if there was a way to do this programmatically. |
@niknbr I have only (Assing To) All Desktops, which does not help, any chance you know why there is such difference? |
@krykra7 My bad. It is "All Desktops". If it helps here is the reference to the function I use it with function moveWindowToCurrentScreen(appName)
local app = hs.application.get(appName)
local window = app:mainWindow()
-- Set window frame when moved to different monitor
local mainScreen = hs.screen.mainScreen()
local mainScreenFrame = mainScreen:frame()
window:setFrame(mainScreenFrame)
-- Move window
local currentSpace = hs.spaces.focusedSpace()
hs.spaces.moveWindowToSpace(window, currentSpace) -- Started working after setting it to "All Desktops"
window:focus()
end
|
@niknbr isn't the whole point of the "Assign to All desktops" command to have all windows of this app always visible in every space? And why someone would want to move them around if they are appearing on every desktop anyway? |
This is frustrating. I've tried the following work-arounds without success:
Both these actions work when performed manually with the mouse and keyboard. They fail when automated with HammerSpoon. |
It simply returns
true
without actually moving the window.The text was updated successfully, but these errors were encountered: