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

Customize duration of opacity transition #208

Closed
lucaorio opened this issue Aug 12, 2019 · 9 comments
Closed

Customize duration of opacity transition #208

lucaorio opened this issue Aug 12, 2019 · 9 comments
Labels
enhancement New feature or request

Comments

@lucaorio
Copy link

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.

@dominiklohmann
Copy link
Collaborator

# 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

@lucaorio
Copy link
Author

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

@dominiklohmann
Copy link
Collaborator

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:

snprintf(message, sizeof(message), "window_alpha_fade %d %f %f", window->id, opacity, 0.2f);

@karkraeg
Copy link

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

@lucaorio
Copy link
Author

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!

@lucaorio lucaorio changed the title Remove space switching, and window focus animations Customize duration of opacity transition Aug 12, 2019
@dominiklohmann
Copy link
Collaborator

Would you consider making the duration of this transition overridable?

That's something for @koekeishiya, who seems to have been semi–absent 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—it's a reasonable request and easily implemented.

@koekeishiya koekeishiya added addressed on master; not released Fixed upstream, but not yet released enhancement New feature or request labels Aug 17, 2019
@koekeishiya
Copy link
Owner

Implemented on master.

@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Sep 3, 2019
@lucaorio
Copy link
Author

lucaorio commented Sep 3, 2019

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

unknown command 'window_opacity_duration' for domain 'config'

koekeishiya added a commit that referenced this issue Sep 4, 2019
@koekeishiya
Copy link
Owner

Turns out pasta is bad for you.

dominiklohmann pushed a commit to dominiklohmann/yabai that referenced this issue Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants