Git Product home page Git Product logo

Comments (10)

koekeishiya avatar koekeishiya commented on June 9, 2024 7

See this commit for a SIP friendly (enabled) solution koekeishiya/yabai@98bbdbd

A little note/mention/credit would be appreciated if my solution is used.

from hammerspoon.

asmagill avatar asmagill commented on June 9, 2024 3

I can confirm @koekeishiya's suggestions seems to work (at least for now, curse you Apple!). I need to do some more testing and it will probably be a couple of days before I can put together a formal pull-request (though I'm fine if someone else wants to have a go at it sooner).

@koekeishiya, what type of notification would you consider appropriate? Normally, I will add comments in the source as to where specific changes/additions are from and add a line or two with links in the documentation (both internal to Hammerspoon and what is ultimately published in our pages) for the relevant module. If you'd like something more, or if there are other licensing concerns, let us know!

from hammerspoon.

sidkang avatar sidkang commented on June 9, 2024

Facing the same issue, 14.4.1 worked, but after 14.5, not any more.

from hammerspoon.

mattfloat avatar mattfloat commented on June 9, 2024

It appears macOS 14.5 changed some functions to protected which could be the reason for our symptoms.
Yabai is facing the same issue. More details there: koekeishiya/yabai#2240 (comment)

from hammerspoon.

cmsj avatar cmsj commented on June 9, 2024

Looks like they were able to achieve the same functionality in another way: koekeishiya/yabai@7bacdd5

from hammerspoon.

SilverEzhik avatar SilverEzhik commented on June 9, 2024

I've observed that it still works for me with Hammerspoon's own windows, but not with any other app's windows.

from hammerspoon.

asmagill avatar asmagill commented on June 9, 2024

@cmsj, it looks to me like yabai added the function to their script injection payload; without doing something similiar (requiring SIP changes and an elevated permissions helper app) I'm not sure we'll be able to accomplish the same.

It might be better to see how closely we can work with yabai and come up with a module/spoon/process for utilizing it as our "helper" or "companion" app.

from hammerspoon.

cmsj avatar cmsj commented on June 9, 2024

Aha. Yeah closer integration with yabai is an interesting option. We could also just get out of the business of pretending that Apple wants us interacting with Spaces in the first place ๐Ÿ˜ฌ

from hammerspoon.

mogenson avatar mogenson commented on June 9, 2024

If hammerspoon can't directly invoke an Apple method to move a window to a space, it would still be nice to provide a utility function to accomplish this same task manually. Similar to how hs.spaces.gotoSpace() opens Mission Control and programatically clicks the desired space.

Here's a work-around replacement for hs.spaces.moveWindowToSpace(): mogenson/PaperWM.spoon@3b48e6b

It involves programmatically clicking a window's title bar, switching to a space, and dragging the window to the new space. This has the limitation that you can't move a window to or from a non-visible space, but it's better than nothing.

Note: I tried this with hs.window:move(), but I couldn't get this method to pick up and hold a window while the space transitions like a mouse click does. Still, it would be nice to accomplish this without having to hijack the user's mouse cursor.

from hammerspoon.

koekeishiya avatar koekeishiya commented on June 9, 2024

@koekeishiya, what type of notification would you consider appropriate? Normally, I will add comments in the source as to where specific changes/additions are from and add a line or two with links in the documentation (both internal to Hammerspoon and what is ultimately published in our pages) for the relevant module. If you'd like something more, or if there are other licensing concerns, let us know!

That will do just fine.

from hammerspoon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.