-
-
Notifications
You must be signed in to change notification settings - Fork 653
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
Rework rules system #2123
Comments
IIRC in bspwm this features works a little different, for example in bspwm you can define a oneshot rule for a specific app to launch on a specific space and then launch the app. the rule is applied to the launched app and then deleted. This is really usefull to create a layout on system boot but afterwards not to be constrained by rules. |
Not sure what terminology bspwm uses for its features, but I don't really know of a good word to substitute it with? The meaning should basically convey something that is
|
The best alternative I can think of would be something like |
If I understand your proposed function correctly, the rule is never persisted to the rules database so Maybe a signature like |
That is a fair suggestion. I originally did not do it that way for code structural reasons, but it is not really an issue. |
also this way |
I'll actually merge it into a single |
That isn't really the case though is it? I have not really thought all that deeply about this originally when rules were implemented, because I usually don't restart yabai during an active workflow/login session; only at boot or before I set up things initially. |
you're right, it would make sense to remove the At the moment I don't have it scripted to create manual layouts on yabai startup like I had in bspwm with the |
I haven't actually attempted this myself , so not competely sure how I would approach it and if the necessary facilities are in place. My workflow these days is not very complex, to put it mildly. I could leave the Then you could have the following states: Add rules that automatically apply to new created windows. To allow for manual layouts on startup (in a non janky way) there likely has to be other changes, but the above structure would be a start, I think. |
this is 100% for me :)
|
Do you happen to know how bspwm handles the one-shot rule in the following scenarios?
Nr1 above is relatively simple for me to handle, just an implementation detail that needs to be taken care of. N2 is more tricky, because that depends on our ability to detect whether something is a dialog/sub/child window or an actual main window, and this is quite problematic... See #2046 for some rambling thoughts. |
I really can not remember for No. 1, because i hate window restoration and try to disable it whenever possible. For No. 2 I remember that I had to tweak some one-shot rules e.g. by regexing on the window title to not hit the splash screen with the rule. |
For nr1 I will have the one-shot rule apply to all those windows. I personally don't really use these restoration features either, but that sounds like the intuitive approach to me. As for nr2, I'll start with a naive approach and the "rule maker" will have to take some care with respect to these applications. And let's take it from there? Thanks for chiming in here btw. Some design decisions are more difficult, so having someone to spar with is very helpful. |
sounds both good for me! As soon as you're ready, I will gladly have a testing session with the one-shot functionality and report back to you. Really glad I could help you with this :) |
Implemented on master.
|
When a window matches multiple rules, all relevant rule effects will be combined before the final determined set of effects are applied to the window. See #1383 for details. |
Fixed in v7.0.0. |
I understand that moving from 6.x to 7.x requires us to add an |
Ref: koekeishiya/yabai#2123 (comment) Signed-off-by: PrayagS <[email protected]>
Sometimes it would be useful to apply a rule only once to known windows, and forget about it -- instead of adding a permanent rule that will also apply to new windows that are created. Basically, it will only apply the rule effects to known windows at the time instead of storing the rule for future use.
The
rule --add
command now takes an optional--one-shot
modifier.e.g:
Current:
yabai -m rule --add [<ARGUMENTS>]
New:
yabai -m rule --add [--one-shot] [<ARGUMENTS>]
The text was updated successfully, but these errors were encountered: