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

App whitelist for rules? #552

Closed
ebai101 opened this issue May 31, 2020 · 3 comments
Closed

App whitelist for rules? #552

ebai101 opened this issue May 31, 2020 · 3 comments
Labels
documentation Documentation

Comments

@ebai101
Copy link

ebai101 commented May 31, 2020

I'm trying to create a whitelist of apps to be managed by yabai. On the wiki there are examples for creating rules specific to apps that match a regex, but is there a way to invert the match so that the rule applies to everything except the matched app?

I tried at first to use a negative lookahead in a rule, something like this:

yabai -m config layout bsp
yabai -m rule --add app="^(?!(Google Chrome|iTerm2))(.*)$" manage=off

POSIX ERE doesn't support lookahead operators, so that didn't work. Why is yabai using this engine specifically? Is it faster than something like PCRE?

Maybe I'm missing something obvious - I couldn't find any previous posts on this topic, so I figured I'd ask.

@koekeishiya
Copy link
Owner

koekeishiya commented May 31, 2020 via email

@ebai101
Copy link
Author

ebai101 commented May 31, 2020

Got it, thank you. I figured there was a native way to do this.

I think the docs could be improved w.r.t this feature, the syntax was a little unclear. Possibly something like:

app[!]=<REGEX>
Name of application. If ! is present, rule applies to applications that do not match the regex.

title[!]=<REGEX>
Title of window.  If ! is present, rule applies to window titles that do not match the regex.

@koekeishiya koekeishiya added the documentation Documentation label Jun 1, 2020
koekeishiya added a commit that referenced this issue Jun 2, 2020
@koekeishiya
Copy link
Owner

Added note in the docs.

unrevre pushed a commit to unrevre/yabai that referenced this issue Jan 26, 2022
AndreasNasman added a commit to AndreasNasman/.config that referenced this issue Sep 13, 2023
AndreasNasman added a commit to AndreasNasman/.config that referenced this issue Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation
Projects
None yet
Development

No branches or pull requests

2 participants