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

Sticky without SIP? #1835

Closed
AlJohri opened this issue Aug 27, 2023 · 1 comment
Closed

Sticky without SIP? #1835

AlJohri opened this issue Aug 27, 2023 · 1 comment

Comments

@AlJohri
Copy link

AlJohri commented Aug 27, 2023

in macOS, I can manually set a window as "sticky" by assigning it to all desktops.

Screenshot 2023-08-27 at 4 47 45 PM

This appears to work properly, except that yabai only registers the window as attached to a single space, and thus the automatic window management no longer works properly.

To mimic sticky-ness, I have marked the window as unmanaged, increased the left_padding by 400 and manually put the window on the left panel so it always shows up there.

yabai -m rule --add app="^Obsidian$" layer=above manage=off
yabai -m config left_padding    400

However, I was wondering if there's a way to more natively support this within yabai? As I understand it, the scripting addition would enable automatically clicking "Assign To" -> "All Desktops". If there was a way that I could tell yabai that I have done this manually, then I would not need to disable SIP and could still use the sticky window?

@koekeishiya
Copy link
Owner

koekeishiya commented Sep 5, 2023

You can use this function to achieve the same as clicking "Assign to: All Desktops": https://github.com/koekeishiya/yabai/blob/master/src/misc/extern.h#L50C1-L50C64
This version does not require SIP to be disabled, however it will then apply to all windows of that application.

The one currently in use in yabai requires SIP to be disabled, but applies to specific windows, and not globally to the application.

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

2 participants