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

Problem with hs.spaces.moveWindowToSpace in 1.0.0 #3666

Open
hououinkami opened this issue Aug 12, 2024 · 2 comments
Open

Problem with hs.spaces.moveWindowToSpace in 1.0.0 #3666

hououinkami opened this issue Aug 12, 2024 · 2 comments

Comments

@hououinkami
Copy link

Hi!
After I upgraded hammerspoon to 1.0.0, the function hs.spaces.moveWindowToSpace stopped working for all windows except for the Hammerspoon console.
My macOS version is Monterey 12.7.6, the sample code just like this:
local currentWin = hs.window.focusedWindow() hs.spaces.moveWindowToSpace(currentWin, 9)
Thanks!

@jottr
Copy link

jottr commented Aug 19, 2024

I'm having the same issue. This used to work, and now, instead of moving the application window to the currently focused space, it activates the space with the application on it.

Hammerspoon 1.0.0

ProductName:		macOS # Sonoma
ProductVersion:		14.5
BuildVersion:		23F79
local spaces = require('hs.spaces')
local application = require('hs.application'

hs.hotkey.bind('ctrl', 'space', function()
  local app = hs.application.get('wezterm')
  print(app)
  if not app then
    application.launchOrFocus('wezterm')
  elseif app:isFrontmost() then
    app:hide()
  else
    local currentSpace = spaces.focusedSpace()
    print(currentSpace)
    spaces.moveWindowToSpace(app:mainWindow(), currentSpace)
  end
end

I see that @asmagill tried to fix this functionality on Sonoma.
It also seems this ticket is basically a duplicate of #3636.
Not sure if the referenced ticket should be reopened or conversation should continue here @cmsj.

@hitzhangjie
Copy link

I'm having the same problem.

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

3 participants