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

macOS Sequoia #2324

Closed
koekeishiya opened this issue Jun 10, 2024 · 62 comments
Closed

macOS Sequoia #2324

koekeishiya opened this issue Jun 10, 2024 · 62 comments
Labels
discussion Discussion

Comments

@koekeishiya
Copy link
Owner

koekeishiya commented Jun 10, 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.

Edit: 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.

@koekeishiya koekeishiya added the discussion Discussion label Jun 10, 2024
@pupbrained
Copy link

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

@Bellavene
Copy link

Bellavene commented Jun 10, 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 : )

@khaneliman
Copy link

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.

@Octogonee
Copy link

Octogonee commented Jun 10, 2024

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

@ianyh
Copy link

ianyh commented Jun 11, 2024

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.

@rendinjast
Copy link

👀

wtf.mp4

@RoyalFoxy
Copy link

RoyalFoxy commented Jun 12, 2024

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

@Bellavene
Copy link

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

@koekeishiya
Copy link
Owner Author

koekeishiya commented Jun 12, 2024

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.

@th0jensen
Copy link

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.

@pupbrained
Copy link

pupbrained commented Jun 13, 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 shouldn't be IIRC. Even without yabai there are apps that can achieve the same functionality without SIP disabled.

@KennethHoff
Copy link

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

@wtf403
Copy link

wtf403 commented Jun 13, 2024

A video to show how smooth this is

Wow, how you doing it with shortcuts?

@zjp
Copy link

zjp commented Jun 13, 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)

@hamishneu
Copy link

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

@kkoscielniak
Copy link

@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)

@pannxe
Copy link

pannxe commented Jun 15, 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)

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

@KennethHoff
Copy link

@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)

@pannxe
Copy link

pannxe commented Jun 15, 2024

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

image

@KennethHoff
Copy link

🤦
Stop repeating Windows' worst decisions...

@Miginyon
Copy link

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

@koekeishiya
Copy link
Owner Author

Just an update from #2331

Screenshot 2024-06-21 at 13 42 46

@koekeishiya
Copy link
Owner Author

Another update from #2331

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

koekeishiya added a commit that referenced this issue Jun 23, 2024
@KennethHoff
Copy link

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?

@donaldguy
Copy link

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.

@donaldguy
Copy link

donaldguy commented Jul 16, 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])

@donaldguy
Copy link

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

@donaldguy
Copy link

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]

@koekeishiya
Copy link
Owner Author

Sounds like some variation of #68

@donaldguy
Copy link

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)

@donaldguy
Copy link

donaldguy commented Jul 17, 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)

@adorabilis
Copy link

Hi, can someone report on Yabai's status on the current macOS Sequoia RC (build number 24A335)? Does scripting addition work? Thanks!

@khaneliman
Copy link

Yeah, I'm on 24A335 and it works fine.

@calliduslabs
Copy link

Hey can someone please help? I just update to Sequoia and reinstalled Yabai. It seems to work fine but i can't send a window to another space. This is how i was using: alt - 1 : yabai -m window --space 1

@zjp
Copy link

zjp commented Sep 16, 2024

Are you sure you loaded the scripting addition?

sudo yabai --load-sa

@exsesx
Copy link

exsesx commented Sep 16, 2024

I just updated to Sequoia as well. Everything's working well, including moving windows to other spaces (SIP partially disabled)

@calliduslabs
Copy link

calliduslabs commented Sep 16, 2024

Are you sure you loaded the scripting addition?

sudo yabai --load-sa

Yes. It's on the top of my yabairc file

``
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa

global settings

Binary space partitioning, stack, or float

yabai -m config layout bsp

yabai -m config external_bar all:32:0

New window spawns to the right if vertical split, or bottom if horizontal split

yabai -m config window_placement second_child

Gap

yabai -m config top_padding 10
yabai -m config bottom_padding 10
yabai -m config left_padding 10
yabai -m config right_padding 10
yabai -m config window_gap 10

Sketchybar support

#yabai -m config external_bar main:30:0

Window borders

#yabai -m config window_border on
#yabai -m config window_border_width 2
#yabai -m config window_border_blur on
#yabai -m config active_window_border_color 0xfff7768e # Tokyonight red
#yabai -m config normal_window_border_color 0xff7aa2f7 # Tokyonight blue

Split ratio

yabai -m config auto_balance off

Mouse

yabai -m config mouse_follows_focus off
yabai -m config mouse_modifier alt

right click + drag

yabai -m config mouse_action2 resize
``

and my skhdrc file is:

``
#change window focus within space
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
alt - h : yabai -m window --focus west
alt - l : yabai -m window --focus east

Rotate windows clockwise and anticlockwise

alt - r : yabai -m space --rotate 270
shift + alt - r : yabai -m space --rotate 90

Rotate on X and Y Axis

shift + alt - x : yabai -m space --mirror x-axis
shift + alt - y : yabai -m space --mirror y-axis

toggle window float

alt - f : yabai -m window --toggle float --grid 4:4:1:1:2:2

maximize a window

alt - m : yabai -m window --toggle zoom-fullscreen

balance out tree of windows (resize to occupy same area)

alt - e : yabai -m space --balance

Resize windows

lctrl + alt - h : yabai -m window --resize left:-50:0;
yabai -m window --resize right:-50:0
lctrl + alt - j : yabai -m window --resize bottom:0:50;
yabai -m window --resize top:0:50
lctrl + alt - k : yabai -m window --resize top:0:-50;
yabai -m window --resize bottom:0:-50
lctrl + alt - l : yabai -m window --resize right:50:0;
yabai -m window --resize left:50:0

swap windows

shift + alt - j : yabai -m window --swap south
shift + alt - k : yabai -m window --swap north
shift + alt - h : yabai -m window --swap west
shift + alt - l : yabai -m window --swap east

move window and split

ctrl + alt - j : yabai -m window --warp south
ctrl + alt - k : yabai -m window --warp north
ctrl + alt - h : yabai -m window --warp west
ctrl + alt - l : yabai -m window --warp east

move window to display left and right

shift + alt - s : yabai -m window --display west; yabai -m display --focus west;
shift + alt - g : yabai -m window --display east; yabai -m display --focus east;

#move window to prev and next space
shift + alt - p : yabai -m window --space prev;
shift + alt - n : yabai -m window --space next;

move window to space

alt - 1 : yabai -m window --space 1
alt - 2 : yabai -m window --space 2
alt - 3 : yabai -m window --space 3
alt - 4 : yabai -m window --space 4
alt - 5 : yabai -m window --space 5
alt - 6 : yabai -m window --space 6
alt - 7 : yabai -m window --space 7
``

Also the hash if matching on /private/etc/sudoers.d/yabai

@calliduslabs
Copy link

Also sip is disabled. csrutil status
System Integrity Protection status: disabled.

It was working before but i just update to Sequoia and now i can't move to another space. If someone can help i appreciate

@calliduslabs
Copy link

Hmm i typed the command on my terminal and got it:

sudo yabai --load-sa
yabai: missing required nvram boot-arg '-arm64e_preview_abi'!

what does that means?

@calliduslabs
Copy link

I just found this command sudo nvram boot-args=-arm64e_preview_abi and rebooted. Everything is fine now.

@eret9616
Copy link

eret9616 commented Sep 25, 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)

wish there is a workaround to fix this, im using both context and yabai, and i just find Amaozn Q can also cause this problem

@koekeishiya
Copy link
Owner Author

koekeishiya commented Sep 26, 2024

Implemented a compatibility workaround/fix in the latest commit (6f9006d) that should resolve the issue. Published in v7.1.4.

@Liquidmantis
Copy link

Can confirm! This seems to have resolved the issue with Contexts for me. Thanks!

@adorabilis
Copy link

Hi, does yabai work on macOS 15.2 (build number 24C101)?

@Liquidmantis
Copy link

I updated yesterday to see if 15.2 fixed another unrelated problem and didn't even think about yabai. Luckily it's working fine for me. The caveat being this is my SIP-enabled work computer so I'm not using some yabai functionality due to that restriction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion
Projects
None yet
Development

No branches or pull requests