-
-
Notifications
You must be signed in to change notification settings - Fork 649
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 of window borders #565
Comments
Implemented a more efficient border system on the master branch. Window borders will now require SIP to be disabled and the scripting-addition to be installed. If you install from the master branch or whenever this is put into a new release, you will have to update/reinstall the scripting-addition for this feature to work. Some information regarding this new border system: There is no longer any need for yabai to track when a window border should be hidden, shown, moved to a different space etc, so this solution is very efficient in comparison to the old system. The border window will always remain above the window it belongs to, and only that window, avoiding the previous issue where the border would also draw above tooltips, notifications, menus and whatever else. This also improves the usage of window borders combined with ffm autofocus. When a window is moved, the border is moved together with the window, seamlessly. There is still some slight delay during expensive window resize operations, or when a lot of windows get resized at the same time. This is sadly unavoidable no matter what, but I think it is at an acceptable level. Borders are not drawn in native-fullscreen spaces, with the exception of Safari fullscreen videos because they work differently somehow. The border system does not support border radius and placement like the old system did, and it probably never will; guess we'll see. commands (as before):
|
Testing this right now, looking really good! |
What should I say? No words can truly express how excited I am!! |
This is awesome! Thanks |
awesome work! Thanks |
This is terrific @koekeishiya, but I am wondering: is there a way to prevent the borders being drawn when a window goes into native fullscreen mode? that feels pretty distracting IMHO, especially in cases like maximizing a video. |
Oh, welcome to back border! |
Borders are no longer drawn in native-fullscreen spaces (with the exception of Safari videos, because they apparently work differently). Also improved efficiency of resizing operations. Edit: Don't forget to reinstall the scripting addition (again), for these changes. |
Awesome, thank you so much! |
@koekeishiya truly outstanding! thank you 🙌 |
Borders looking great here. |
This is great news! For anyone using the Nix package/module who wants to test this out, you can use an overlay with {
yabai = super.yabai.overrideAttrs (o: {
version = "master";
src = super.fetchFromGitHub {
owner = "koekeishiya";
repo = "yabai";
rev = "17fcfb73d8bc013b0250a9be42adb91c1a7cb72e";
sha256 = "065qdf5q955jr2cic47w0nxmp8n13dvjpmi6b779kggr38b1l7wz";
};
});
} So far so good, the performance is much better! Thanks very much for your endeavours @koekeishiya 💜 |
Borders can now be toggled per window and specified to be enabled/disabled through rules regardless of the window_border setting. This should make it easier for people who may only want borders for some specific windows. There is also a border attribute in the result of window queries indicating whether or not the window currently has a border. |
Hi @koekeishiya, |
yabai -m query --windows --space |
jq '.[].id' |
xargs -I{} yabai -m window {} --toggle border |
Hi @dominiklohmann, Thank you. What my requirement is that when I change a space layout to float, all windows in this space will not have border. "All windows" here I mean:
"1" could be achieved by using your script. For "2", what I am thinking is to use yabai signals with an event window_created. The action part is to first check whether the type of the space is float or not (via However, this way looks burdensome. I'm wondering whether yabai could add the value I think this feature is very useful. the scenario to apply this feature is that sometimes we want to make a workspace temporarily perform as vanilla macOS (i.e., no tiling, no border). Thank you. |
You surely could implement that using the signals API, but it's far from a trivial task. Have you considered turning window borders on/off globally depending on what space you're in, i.e., toggling them globally based on the signal |
Thank you. But you get me wrong (I updated my comment above). Briefly, my scenario is like this: I am working in space no. 3 and suddenly I want to change this space to perform as plain macOS, i.e., floating and no border (because for some work, tiling window and border are not that convenient). And later, I may change it back. To implement this, I just need to bind a key to So I think add a value Thanks. |
My implementation so far is: Step1. In skhdrc alt + ctrl - f : yabai -m space --layout float && \
yabai -m config window_border off
alt + ctrl - b : yabai -m space --layout bsp && \
yabai -m config window_border on When I change the space layout to float, I turn off the global border. And when I change the space layout back to bsp, I turn on the global border. Step2. In yabairc yabai -m signal --add event=space_changed action="type=\$(yabai -m query --spaces --space | jq .type) && [ \$type = '\"bsp\"' ] && yabai -m config window_border on"
yabai -m signal --add event=space_changed action="type=\$(yabai -m query --spaces --space | jq .type) && [ \$type = '\"float\"' ] && yabai -m config window_border off" When switch space, if the target space is bsp, turn on the global border, and if the target space is float, turn off the global border. My implementation above basically meets my requirement, but it has a drawback. That is when I switch to a float space, I can see the border momently before it is off. |
Having the exact same issue. |
you need to disable SIP and install sa. i updated my comment above. |
Oops - my apologies. I had done that but then not restarted the Dock...
…On Thu, Jun 18, 2020 at 9:40 AM Tuan Anh Tran ***@***.***> wrote:
Having the exact same issue.
you need to disable SIP and install sa. i updated my comment above.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#565 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABBJA3CLEJJV2DV6VFFRTTRXIKNNANCNFSM4N2RLFOA>
.
|
Is it only for me that the borders don't disappear in native fullscreen, and that the borders cover parts of the app? For example the left most letter in Alacritty is partially underneath the border. I have SIP disabled and the scripting addon installed. |
@Aleppi I have observed the border being drawn on native fullscreen applications, but only after starting/restarting yabai when the window is already in that state. Regarding Alacritty, I think that's just the nature of where Alacritty is drawing its characters. You can address this by setting |
@cmacrae For me it draws a border over fullscreen apps regardless if they were fullscreen before or after restarting yabai, but on my laptop it doesn't happen. It is not only alacritty where the overlap happens, it happens in all apps, for example the leftmost part of Discord where one sees if there are any notifications for a server is partially covered by the bar. |
Use overlay to install master branch yabai w/ window borders: koekeishiya/yabai#565 (comment)
Hey, I'd just like to give a big thank you for re-introducing window borders. My productivity took a big hit when they disappeared and I am delighted to see them return. Thank you so much for your hard work! |
I've just started using Yabai today, and have been working on getting my config built out. I've disabled SIP, installed the scripting additions, killed Dock, but still have an issue with the borders getting stuck. If I maximize a window to native-fullscreen a seemingly random normal (not active) border from another window is stuck. The only way I've been able to make it go away is to toggle borders. |
Could we have the border system separate from yabai, kind of like limelight? i would love window borders but i choose no to use yabai due to some limitations. |
…der resize handling
…le even if window_border off is specified
So I have recently due to a discussion in a different OSS application been able to come across some information that I believe will be able to solve all the issues with window borders that I talked about in #487
My basic testing so far has made me quite optimistic that this is now achievable.
This will require the scripting-addition to be installed, but this is once more a feature I think is worth that trade-off. Apologize in advance to people who cannot run with SIP disabled for whatever reason, you can still use limelight instead (a much lower quality version).
The text was updated successfully, but these errors were encountered: