-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Return non-zero exit code when per-space config value cannot be read #69
Comments
So the config settings that modify space properties are different from all other settings. Space settings must be set before a space / view is created, and only then are they used. All other config settings can be modified live at any time and their change will take effect immediately. The reason they are -1 by default, is that is the default value that means this space uses the global space settings, in which I think rather than returning an exit code, or -1, yabai should simply return the global padding value for the given setting. However, this will not be relevant if I handle the underlaying issue that I mentioned before this paragraph. |
That's fine by me. I was playing around with a script that increases left and right padding if there's only a single monitor available. The proposed fix is just what came to my mind first.
Do you think it makes sense to also allow a --display override then? With priority dynamically set > space > display > global? |
Might take a look at this in the future. I think the first step is to store space specific settings internally by using the CGSSpaceId rather than the mission-control index. After this has been resolved, and spaces are working properly - maybe there will be a simple way to extend that to support a display override. |
All config settings can now be edited at runtime and have their changes reflect immediately, except for status_bar settings. Edit: Changing global space settings at runtime will affect all spaces that inherited that value.
|
Issue
Currently, querying a per-space config value prints -1 to stdout when there is no value configured and exits successfully.
Proposed fix
The function should return a non-zero exit code so a fallback value can easily be read by scripts. Error messages should also be printed to stderr.
The text was updated successfully, but these errors were encountered: