Comments (10)
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.
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.
Facing the same issue, 14.4.1 worked, but after 14.5, not any more.
from hammerspoon.
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.
Looks like they were able to achieve the same functionality in another way: koekeishiya/yabai@7bacdd5
from hammerspoon.
I've observed that it still works for me with Hammerspoon's own windows, but not with any other app's windows.
from hammerspoon.
@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.
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.
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, 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)
- ** Warning: LuaSkin: hs.audiodevice.watcher callback fired, but theWatcher is nil. This is a bug
- ERROR: hotkey.lua:415: key must be a string or a number HOT 6
- Create Helper apps with Hammerspoon and sell it? HOT 2
- attempt to call a nil value (method 'setCallback')
- A way to prevent hs.alert.show() from stealing focus? HOT 1
- Unexpected behavior when moving a window with `moveToUnit` HOT 2
- hs.window:raise() focuses raised window when other window for same application is focused HOT 1
- hs.window.filter stops emitting windowFocused events for application if one window has tabs HOT 1
- Add functions to hs.mouse to get more information about cursor type HOT 1
- hs.notify.show doesn't work HOT 2
- Support for Elgato Stream Deck Neo HOT 1
- hs.serial:sendData(value) chokes after some indeterminate amount of time? HOT 2
- hs.socket and hs.socket.udp listens on all interfaces
- `hs.alert.defaultStyle`: option to add top or bottom margin
- hs.urlevent: Fix multiple query params and pass in fullURL to hs.urlevent's bind callback
- cannot remap SHIFT + ยง
- backspace key code?
- Wrong screen frame after toggling menubar auto-hide off and on
- `hs.spaces.removeSpace` fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hammerspoon.