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

Automatically manage=off for any windows that come from a specific app. #885

Closed
kodokoto opened this issue Apr 19, 2021 · 4 comments
Closed

Comments

@kodokoto
Copy link

Is it possible to have sub-windows from a specific application (i.e plugin windows from a DAW) automatically set to floating?

Sorry if this has been asked before, I tried searching but I couldn't find any others.

@anujc4
Copy link

anujc4 commented Apr 26, 2021

You might want to look at this solution that pretty much does the same with Jetbrains IDEs

@kodokoto
Copy link
Author

kodokoto commented Aug 17, 2021

I have recently tried tackling this again. The solution above doesn't work for Ableton unfortunately as the window title depends on the project name, and there is no way to change that functionality from what I can tell.

I have been able to find a solution, however there is a noticeable delay when opening a window:

yabai -m rule --add app="^Live$" manage=on
yabai -m signal --add event=window_created app="^Live$" action 'yabai -m window $YABAI_WINDOW_ID --toggle float'

video of the delay happening: https://i.gyazo.com/faa48056350b1b9837b1bc8404a0b9f8.mp4

This works because the window_created event doesn't trigger when the application is launched in macOS as mentioned in #174 , however for the same reason, I can't do something like this where Ableton's windows are floating by default, except for any window with level: 0, which is the main window.

yabai -m rule --add app="^Live$" manage=off
yabai -m signal --add event=window_created app="${apps}" action='yabai -m query --windows --window $YABAI_WINDOW_ID | jq -er ".level == 0" && yabai -m window $YABAI_WINDOW_ID --toggle float'

I have tried using the application_launched event like this, but it doesn't work

yabai -m signal --add event=application_launched app="${apps}" action='yabai -m window "$(yabai -m query --windows | jq ".[] | select(.app="Live") | .id" )" --toggle float'

I am not very good at jq, so it might be that I am using it incorrectly, however I have a suspicion that the reason it doesn't work is because there is about a 30-45 second delay when opening Ableton till the window pops up.

There is probably a better way of doing things, however I feel like I've sort of hit a brick wall and I don't know how to tackle it.

@hrvstr
Copy link

hrvstr commented Aug 22, 2021

For Ableton Live I use these rules:

yabai -m rule --add app="^Live$" title="^.*\[.*\]$" manage=on
yabai -m rule --add app="^Live$" title="^Unbenannt$" manage=on

It matches project names foo [bar] and empty projects Unbenannt in the window title. Plugins are not affected.

@kodokoto
Copy link
Author

Thank you so much, I just tried it and it works!

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

3 participants