Yabai: Customize duration of opacity transition

Created on 12 Aug 2019  路  9Comments  路  Source: koekeishiya/yabai

Is it possible to have an instant switch between spaces, and windows focus without any kind of animation? (like chunkwm)

I checked the _reduce motion_ accessibility option, but the opacity transitions are still kind of slow.

enhancement

Most helpful comment

Turns out pasta is bad for you.

All 9 comments

# focus selected space without animation
yabai -m  space --focus <space selector>

# focus selected window and iff necessary switch the space without animation
yabai -m window --focus <window selector>

See also: The following features of yabai require System Integrity Protection to be disabled

Thanks for getting back to me, @dominiklohmann :) SIP is disabled, and that's exactly how I'm switching between spaces/windows.

The windows focus relies on opacity:

yabai -m config window_opacity on
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.5

But when I change focus to a window/space, there always is a fade in the opacity. I was wondering if it's possible to remove that transition.

I do not have this problem in simply using a border to highlight the focus.

ScreenFlow

The window focus change is instant, it's just the opacity transition that is not.

It's set to a fixed 0.2 seconds here:

https://github.com/koekeishiya/yabai/blob/6c846d4151e42c0c341add7e3df2799e39bb8b3f/src/window_manager.c#L426

Hi @lucaorio sorry to ask this in this thread but would you mind telling me the name of the Vscode theme your using? Thanks!

Thanks for clarifying, @dominiklohmann . Would you consider making the duration of this transition overridable?

In _chunkwm_ this was possible with

chunkc set window_fade_duration 0

@karbecker I customized it a bit, but main theme is based on the Material one!

Would you consider making the duration of this transition overridable?

That's something for @koekeishiya, who seems to have been semi鈥揳bsent over the past week. I'm just a contributor here, and while I do know my way around the code base and have made a few changes locally, I am mostly helping here with triage and documentation. I am not a maintainer of this project.

In the meantime, you can easily fork this and change just that one value to 0.0f.

Personally I consider this a feature worth implementing鈥攊t's a reasonable request and easily implemented.

Implemented on master.

@koekeishiya I just installed yabai-v2.0.0, but in the error logs I get:

unknown command 'window_opacity_duration' for domain 'config'

Turns out pasta is bad for you.

Was this page helpful?
0 / 5 - 0 ratings