Code Monkey home page Code Monkey logo

Comments (48)

koekeishiya avatar koekeishiya commented on July 23, 2024 34

Edit: Also please try and look into why yabai can't inject the scripting addition anymore, I really am a turtle on it's back without yabai

This might just be the end of the scripting addition then. I have very little interest left in trying to circumvent all of these restrictions that they keep adding. The required effort is just not worth it to me personally anymore -- figuring out workarounds by myself is very time consuming.

I'll install Sequoia on a separate volume and look into things when I feel like banging my head against the wall, and take a brief look at the situation. If I can't make things work without having to put in substantial effort, I'll remain on Sonoma for a couple of years and so will this software.

Also edited the following into my first post, but maybe people haven't re-read it:
My initial assumption is that this is part of the AppKit framework and not a separate set of APIs, meaning that we will not be able to hook into this functionality from a third-party app in any meaningful way.

from yabai.

koekeishiya avatar koekeishiya commented on July 23, 2024 33

Just an update from #2331

Screenshot 2024-06-21 at 13 42 46

from yabai.

Miginyon avatar Miginyon commented on July 23, 2024 17

Edit: Also please try and look into why yabai can't inject the scripting addition anymore, I really am a turtle on it's back without yabai

This might just be the end of the scripting addition then. I have very little interest left in trying to circumvent all of these restrictions that they keep adding. The required effort is just not worth it to me personally anymore -- figuring out workarounds by myself is very time consuming.

I'll install Sequoia on a separate volume and look into things when I feel like banging my head against the wall, and take a brief look at the situation. If I can't make things work without having to put in substantial effort, I'll remain on Sonoma for a couple of years and so will this software.

Also edited the following into my first post, but maybe people haven't re-read it:

My initial assumption is that this is part of the AppKit framework and not a separate set of APIs, meaning that we will not be able to hook into this functionality from a third-party app in any meaningful way.

Fair enough bro, you've been an absolute legend

from yabai.

koekeishiya avatar koekeishiya commented on July 23, 2024 14

Things should be working properly on the first Sequoia Beta now. (Adjustments likely required for second beta).

from yabai.

shsw228 avatar shsw228 commented on July 23, 2024 12

To switch spaces works on latest commit build :)

from yabai.

rendinjast avatar rendinjast commented on July 23, 2024 11

πŸ‘€

wtf.mp4

from yabai.

pupbrained avatar pupbrained commented on July 23, 2024 9

Just updated - seems the only thing broken w/ yabai is sending windows to other workspaces (yet again).

from yabai.

RoyalFoxy avatar RoyalFoxy commented on July 23, 2024 5

I have 0 clue about how macos structures their apis but after testing the builtin snapping it feels great as it's smooth and responsive. I really hope they make this api open and exentsible for third party apps to use and I really hope yabai can use this api too.

A video to show how smooth this is https://imgur.com/a/seTzNUQ

Edit: Also please try and look into why yabai can't inject the scripting addition anymore, I really am a turtle on it's back without yabai

from yabai.

koekeishiya avatar koekeishiya commented on July 23, 2024 5

Another update from #2331

Screenshot 2024-06-23 at 15 32 54 Screenshot 2024-06-23 at 15 33 01

from yabai.

pannxe avatar pannxe commented on July 23, 2024 4

@cmdham You probably should be able to re-map these hotkeys as you wish in the Keyboard Shortcuts. (didn't install Sequoia though, can't tell for sure)

Nope, there is no option to do so that I can find (at least in beta 1).

from yabai.

Octogonee avatar Octogonee commented on July 23, 2024 3

Just updated - seems the only thing broken w/ yabai is sending windows to other workspaces (yet again).

Moving to other workspaces with skhd is broken for me aswell.
edit: scripting-addition failed to inject into dock.app

from yabai.

Vib1240n avatar Vib1240n commented on July 23, 2024 3

Macos Sequoia Beta 2, yabai seems to be working properly with skhd. Installed from head and updated the hash. I can confirm that I am able to switch and focus spaces, displays and have my focus follows mouse working. Haven't noticed any Dock crashes or any other crashes with yabai. Also the scripting addition loaded properly when reinstalling from HEAD.

from yabai.

cmdham avatar cmdham commented on July 23, 2024 2

A video to show how smooth this is

Wow, how you doing it with shortcuts?

Screenshot 2024-06-14 at 11 27 16β€―am

You can use 🌐+Ctrl+Arrows and 🌐+Ctrl+Shift+Arrows

from yabai.

pannxe avatar pannxe commented on July 23, 2024 2

Current head version works perfectly on beta 3, yay!

from yabai.

khaneliman avatar khaneliman commented on July 23, 2024 1

This is the first place I came to check after seeing that as one of the features in the next update. Was hoping that'd give a more stable experience since it's becoming a first class citizen of the OS.

from yabai.

ianyh avatar ianyh commented on July 23, 2024 1

I figured them locking down the APIs portended them adding their own tiling thing. I might try the dev beta at some point and poke around.

from yabai.

Bellavene avatar Bellavene commented on July 23, 2024 1

I have 0 clue about how macos structures their apis but after testing the builtin snapping it feels great as it's smooth and responsive. I really hope they make this api open and exentsible for third party apps to use and I really hope yabai can use this api too.

A video to show how smooth this is https://imgur.com/a/seTzNUQ

Edit: Also please try and look into why yabai can't inject the scripting addition anymore, I really am a turtle on it's back without yabai

Looks promising

from yabai.

pupbrained avatar pupbrained commented on July 23, 2024 1

I'm not sure if focus follows mouse is dependent on the scripting addition, but at least everything in my yabai workflow is working on Sequoia. Only issues I have are with skhd.

It shouldn't be IIRC. Even without yabai there are apps that can achieve the same functionality without SIP disabled.

from yabai.

wtf403 avatar wtf403 commented on July 23, 2024 1

A video to show how smooth this is

Wow, how you doing it with shortcuts?

from yabai.

pannxe avatar pannxe commented on July 23, 2024 1

Surprise, surprise. Focusing space now does not work again on beta 2. No Dock crash tho.

from yabai.

pannxe avatar pannxe commented on July 23, 2024 1

Additional info: I try revert back to previous version of yabai (the one that crashed Dock.app when switching space) and nothing happened when I try to do anything (not even Dock.app crashing).

I think that offset values changed again in this version?

Edit: here's my Dock.app again β†’ GDrive

Edit 2: Confirmed

image

from yabai.

Bellavene avatar Bellavene commented on July 23, 2024

Apple has introduced their own window snapping implementation. Let's see if this is backed by something more reliable than the accessibility API that is currently exposed to third-party developers.

I doubt it will be. Fully understand your decision to switch to something else. In past year's apple showed us, that they don't follow their own logic anymore. For example, cmd+first letter in question dialogs, or stage manager without shortcuts. By their logic, you need what they told you to need. You can't turn off most unneeded services, without consequences. Sad story, when you have no control over your system, and it is getting weirder and weirder. Funny how they advertise microsoft's chat gpt, the theater came to an end, at least with that : )

from yabai.

th0jensen avatar th0jensen commented on July 23, 2024

I'm not sure if focus follows mouse is dependent on the scripting addition, but at least everything in my yabai workflow is working on Sequoia. Only issues I have are with skhd.

It also seems that the yabai process is being stopped at some times, and a new prompt shows up warning about privacy when you wake from sleep.

from yabai.

KennethHoff avatar KennethHoff commented on July 23, 2024

Even if the new system doesn't work with Yabai (or anything else), presumably the existing workflow would still work, right?

from yabai.

zjp avatar zjp commented on July 23, 2024

If I start yabai, then uninstall and load the scripting addition it works for me.

(well, it did briefly then stopped and I can't reproduce it)

from yabai.

kkoscielniak avatar kkoscielniak commented on July 23, 2024

@cmdham You probably should be able to re-map these hotkeys as you wish in the Keyboard Shortcuts. (didn't install Sequoia though, can't tell for sure)

from yabai.

KennethHoff avatar KennethHoff commented on July 23, 2024

@pannxe Is it at least possible to entirely disable the feature, or did we just lose 8 combinations of keybinds for other use (Assuming we do not intend on using the feature)

from yabai.

pannxe avatar pannxe commented on July 23, 2024

@KennethHoff I don't think you can. The most you can do is disable edge snapping I think

image

from yabai.

KennethHoff avatar KennethHoff commented on July 23, 2024

🀦
Stop repeating Windows' worst decisions...

from yabai.

KennethHoff avatar KennethHoff commented on July 23, 2024

In macOS Sequoia, SIP must be disabled to be able to move windows between spaces.

What does "must be disabled" mean? SA currently requires partially disabling SIP (doesn't it?); Does Sequoia require fully disabling it?

from yabai.

pannxe avatar pannxe commented on July 23, 2024

In macOS Sequoia, SIP must be disabled to be able to move windows between spaces.

What does "must be disabled" mean? SA currently requires partially disabling SIP (doesn't it?); Does Sequoia require fully disabling it?

Only partial will do.

from yabai.

th0jensen avatar th0jensen commented on July 23, 2024

I just updated to Sequoia Beta 2 and can report that yabai is working, just like in Beta 1

from yabai.

Octogonee avatar Octogonee commented on July 23, 2024

Switching spaces not working on beta 2.

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

For my part, it appears yabai (head with AX permissions & SA) is apparently not getting informed of window destroyed events (whether window is closed by ⌘W, clicking red x, File -> Close Window, or indeed yabai -m window --close

[nor does it report seeing creates (just focus) for windows auto-vivified on application focus after such closes; for single window apps they appear retained in query while "gone"1, and come back with the same ID 2 - so this may be ~mostly accurate to how macOS does this now? 3 ;

(but when it was a second window, it goes away from query once closed, and a new second window has different ID, etc. but previous space occupied apparently remains allocated until application is hidden; for single window apps, yabai treating it "normally" again seems to require terminate and open)

(it is getting minimized, de-minimized, hidden, and at-other-close-time application-front-switched)


so in practice as I naively ⌘W & ⌘-Tab around I end up gradually halving my working space until I restart yabai (or force myself to quit/hide) [I also sometimes get windows drawing over each other; I haven't quite characterized when exactly - but seems related for sure]

no ~shade on not working perfectly on a beta, but I just wanted to post fair warning (for others considering the upgrade) given that the consensus appears to be all good

Footnotes

  1. with status as:

    "title":"",
    "scratchpad":"",
    "frame":{
    "x":0.0000,
    "y":0.0000,
    "w":0.0000,
    "h":0.0000
    },
    "role":"",
    "subrole":"",
    "root-window":true,
    "display":1,
    "space":1,
    "level":0,
    "sub-level":-20,
    "layer":"normal",
    "sub-layer":"below",
    "opacity":1.0000,
    "split-type":"vertical",
    "split-child":"second_child",
    "stack-index":0,
    "can-move":false,
    "can-resize":false,
    "has-focus":false,
    "has-shadow":true,
    "has-parent-zoom":false,
    "has-fullscreen-zoom":false,
    "has-ax-reference":true,
    "is-native-fullscreen":false,
    "is-visible":false,
    "is-minimized":false,
    "is-hidden":false,
    "is-floating":false,
    "is-sticky":false,
    "is-grabbed":false
    
    ↩
  2. when re-summoned, it does pick up "is-visible": true in query, but doe not regain role, subrole, title or dimensions [or in one case, it retained dimensions while hidden and when initally restored, but went to zeros on manual resize (to attempt to use some of the "lost" space. ).

    By contrast, Accessibility Inspector.app sees title and frame okay after restore and resizes. It leaves windows highlighted/inspected on close, but idk if thats different in Sequoia or has always been that way ↩

  3. in the past I have seen this sort of "shadow open" window misbehavior with Firefox and maybe Safari, but it seems to have now spread to all apps ↩

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

[possibly slightly more mysteriously, I just rebooted and ended up with first window I opened drawing on right half of screen

I did have second_child config;

or possibly just a case of the above; by the time I checked in that first-window which was a terminal -m query --windows only knew about that window, and I certainly never saw anything else paint, but maybe yabai saw something occupy that space and then didn't see it disappear (from the vantage point of event handling; if not query)]

from yabai.

koekeishiya avatar koekeishiya commented on July 23, 2024

I don't have any of these issues on my Sequoia install. (Both beta1 and 2 worked fine). Likely just macOS accessibility flakiness.

from yabai.

zjp avatar zjp commented on July 23, 2024

Working fine here too

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

Well I wonder why it hates me personally πŸ™ƒ

I made sure that sa is definitely loading (It wasn't for a bit there cause I did the sha256 tagged sudoers fromt he wiki and didn't update that)

both /opt/homebrew/Cellar/yabai/HEAD-09a7b23/bin/yabai and (now to double check since its the symlink path in the plist) /opt/homebrew/bin/yabai are in the tccutil--list output

and seeing same behavior (of closed windows being treated as though persisting / consuming space in the layout)

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

I'd be pretty surprised if this were the issue1 but in terms of possible self-inflicted wounds: my /private/var/select/sh is pointing at /bin/zsh and early in my .yabairc (after loading the sa though) I do emulate zsh to bring shell features back for my config

Footnotes

  1. since yabai runs directly under launchd without a shell - and I don't think generally spawns subshells for things other than config and rule/signal actions (which I currently have none configured) ↩

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

Well I wonder why it hates me personally πŸ™ƒ

Okay well, after doing a reinstall1 to pick up the couple new commits on head, daemonized yabai this time asked for both accessibility and screen recording and now seems less easily confused πŸŽ‰

(the screen recording prefpane knew about a yabai before ostensibly but apparently not at correct path?2:

System Settings (Screen   System Audio Recording) -07-11 @ 14 10@2x
)

Footnotes

  1. I also did sudo yabai --uninstall-sa + sudo yabai --load-sa x2 ; I don't think it was the first time I tried that ↩

  2. it seems equally possible that this is just a leftover entry for /opt/homebrew/Cellar/yabai/HEAD-09a7b23/bin/yabaias well as the correct entry for /opt/homebrew/Cellar/yabai/HEAD-cee556d/bin/yabai - but I don't honestly remember getting prompted for screen record before - and I do hear this is an area people are having trouble with in Sequioa broadly, so maybe CGPreflightScreenCaptureAccess got unreliable there for a bit? ↩

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

hmm it seems like maybe removing that "invalid" (didn't open anything on right-click Reveal in Finder ; had broken icon ) and apparently redundant screen recording entry may have actually re-broken layout handling of window closes ?

(but -m query --windows output remains more correct than before)

(EDIT: but also removing the other, and doing --restart-service and following from prompt to enable it again seems to have fixed again?

EDIT 2: well ... (and maybe the "fix" of edit above was just confusion) what I am seeing now is actually:

  1. window query output looks right pretty consistently
  2. layout is still not responding to the close of windows via ⌘W (for both going from n to n-1 windows for same app; and/including going from 1 to 0 apps in which that does not effect an immediate termination)
  3. but I think unlike before it does respond belatedly if I also terminate the program the windows belonged to

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

Okay, I am pretty sure my issue is caused by Arc Browser (on Sequoia, I don't believe it was an issue before upgrade)

(this makes some sense as Arc is a program with a pretty atypical concept of windowing (New Window (⌘N)) gives you clone(s) of windows that share state, but are expected to point at different tabs; and then for external links from another program it makes "Little Arc" windows that are AXSystemDialogue subrole (as the intended UX is that you either close it or push the button that moves it to the main window[s]). There can also be Incognito windows, and I just learned there is also a [New] Blank Window [^⌘N] that acts more like other browsers' concept of new windows )

what makes less sense is why/how it "infects" other programs - as I am seeing these "ghost window" misbehavior for all programs and all spaces when Arc is running even if it is hidden, or minimized, or has no open windows (according to my eyes and yabai query)

Arc does not have Accessibility or Input Recording or Screen Recording permissions

at core it is just a Chromium process (though perhaps unlike Chrome or most electron apps [I need to check more], it does apparently keep most of its --type=renderer and GPU process alive when there are no windows (and so no tabs) ~visibly open. that seems likely to be relevant - but I'll have to dig in more to how.

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

Actuallyβ€” while I was attempting to verify / differentiate whether terminating Arc immediately restored sanity or if it was only after restarting yabai without Arc openβ€” I instead (got confused because)β€”Β I hit a second case of inducing the behavior:

Pressing ⌘N in Finder (a second+ time / with a window open ) apparently now(?, on my machine anyway) opens new tab rather than a new window, but yabai is reacting like a new window was opened (which maybe on some level it was, but certainly yabai -m query --windows only believes there is one

so given these two examples, it seems like at core the issue may be related to programs doing something other than in the traditional sense opening a new window on Cmd-N

(Its definitely also possible that something else I am running is injecting confusion when it sees that, but I'm not immediately sure what that would be… because it could be several things πŸ˜… ; I'll keep looking / doing ddx [and or get less lazy and actually put a build of yabai in a debugger to see clearer what the code sees])

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

But certainly whether or not the Finder issue repros for anybody else should be easy enough to test if you are so inclined

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

Also lest my description wasn't clear here have a video - the fact that each tab appears to be listed in the long-press-on-dock-icon seems possibly relevant (to suggest that there is some window-like object somewhere)

[email protected]

from yabai.

koekeishiya avatar koekeishiya commented on July 23, 2024

Sounds like some variation of #68

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

Sounds like some variation of #68

Since theres a known thing there, this probably isn't actually helpful, but

Its definitely also possible that something else I am running is injecting confusion when it sees that, but I'm not immediately sure what that would be… because it could be several things

I tore all the way down to

$ sudo launchctl list | grep -v apple 
PID	Status	Label
540	0	fans
-	0	com.vix.cron

 
$ launchctl list | grep -v apple  
PID	Status	Label
1441	-15	com.koekeishiya.yabai

and definitely Finder continues to behave like in above video.

(Frustratingly, it does seem like Arc's ability to infect other programs windows behavior is perhaps eliminated here at barebones runtime)

from yabai.

donaldguy avatar donaldguy commented on July 23, 2024

As I've been re-boostrapping stuff and trying to catch when issues start, I am now pretty sure https://contexts.co/ is the real culprit (~the actor who is getting confused by Arc and/or Finder tabs and then somehow ~generalizing behaviors to other programs; my intuition on how is something to the effect holding on to some sort of handle that is suppressing GC at the Obj-C/Swift runtime level or so)

--

Given that it is also very much in the business of observing windows, it was in fact one of my first suspects, but quitting it didn't (and doesn't, alone) seem to resolve weirdness

However it seems like quitting it, restarting Dock.app (!!), and then restarting yabai-proper and (thus) reloading the SA takes things back to behaving like before Contexts was opened.


Compatibility with this specific 3rd party app is obviously not in project scope for yabai and I can definitely live without it, so πŸŽ‰

I do wonder what it is doing that is managing to cause issues that outlive termination of its process though πŸ€”

(EDIT, FYI-for-nobody: since returning to default macOS ⌘-Tab after a long time was weirdly uncomfortable and I'm not ready to break myself of the habit [in favor of more efficient bindings] at the moment, I am giving https://alt-tab-macos.netlify.app/ a shot and glad to report it does not seem to cause any similar issues to contexts)

from yabai.

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.