How to disable all Unity animations?

Bucic

If it's not possible then maybe just the Dash show/hide animations. I simply find myself waiting for animations which is pointless.

ish

enter image description here

1. Why you cannot disable this Dash animation in Unity 12.04

  • Unfortunately, the fade/opacity animation and associated times are hard-coded in the Unity source code.
  • The actual code may be found in unity-5.12/plugins/unityshell/src/ShortcutController.cpp (this is what you would have to modify and recompile to get rid of the animations)
  • Some sample lines from this file demonstrating the hard-coding of the animation when you use the Super key to launch the Dash:

    30:const unsigned int SUPER_TAP_DURATION = 650;
    31:const unsigned int FADE_DURATION = 100;
    39:  , fade_in_animator_(FADE_DURATION)
    40:  , fade_out_animator_(FADE_DURATION)
    65:  fade_in_animator_.animation_updated.connect(sigc::mem_fun(this, &Controller::OnFadeInUpdated));
    66:  fade_in_animator_.animation_ended.connect(sigc::mem_fun(this, &Controller::OnFadeInEnded));
    67:  fade_out_animator_.animation_updated.connect(sigc::mem_fun(this, &Controller::OnFadeOutUpdated));
    68:  fade_out_animator_.animation_ended.connect(sigc::mem_fun(this, &Controller::OnFadeOutEnded));
    120:    show_timer_ = g_timeout_add(SUPER_TAP_DURATION, &Controller::OnShowTimer, this);
    149:    self->fade_out_animator_.Stop();
    150:    self->fade_in_animator_.Start(self->view_window_->GetOpacity());
    213:    fade_in_animator_.Stop();
    214:    fade_out_animator_.Start(1.0 - view_window_->GetOpacity());
    244:  .add("timeout_duration", SUPER_TAP_DURATION + FADE_DURATION)
    246:  .add("about_to_show", (Visible() && !fade_out_animator_.IsRunning() && view_window_ && view_window_->GetOpacity() != 1.0f))
    247:  .add("about_to_hide", (Visible() && !fade_in_animator_.IsRunning() && view_window_ && view_window_->GetOpacity() != 1.0f))
    
  • Of course, you would have to patch this and rebuild with every new Unity update...

  • No amount of meddling with Compiz can change this because all of it is hard-coded outside of the Compiz plugin.

2. Alternative A: Switch to Ubuntu 2D

Ubuntu 2D has different Unity Shell code, and there, launching the dash via Super is instantaneous and does not animate anything.

3. Alternative B: Use a custom shortcut to launch the Dash by clicking on the Ubuntu Logo, thus bypassing the animation

We can exploit the fact that the opacity/fade animation does not happen when you launch the Dash via the "start" button, or, if your cursor is on/around the launcher bar, even if you press Super:

enter image description here

The animation will be delayed until your cursor actually moves inside the dash area.

  1. xdotool allows automation of keyboard and mouse clicks/movements; install it with sudo apt-get install xdotool
  2. Open Settings...Keyboard, and go to the Shortcuts tab. Create a custom shortcut, naming it whatever you want, and set the "Command" to:

    xdotool mousemove --sync 25 60 click 1 --delay 100  mousemove restore
    

    enter image description here

    • You may need to adjust the coordinates (25 60) a little if your screen resolution is below 1024x768 or so.
  3. Click Apply. The right-column will say "Disable", click on it and you'll see "New Accelerator": press your shortcut key combo. You cannot choose Super, even if you disable it in Compiz, because it is hard-captured by Unity. I chose Ctrl+Alt+Z since it's close to the Super key.

  4. Now your shortcut should launch the Dash much, much faster.

    • Here's a Youtube video demo. The first few times (when the launcher on the left blurs and darkens) is with the SUPER key; then its with the custom xdotool shortcut (notice the launcher no longer animates and the dash appears faster)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to disable all animations in ios simulator

From Dev

How to disable all animations in ios simulator

From Dev

Is there a way to disable all PrimeFaces animations?

From Dev

Is there a way to disable all animations on ios?

From Dev

CATextLayer - how to disable implicit animations?

From Dev

CATextLayer - how to disable implicit animations?

From Dev

How to disable animations in Ubuntu 16.04

From Dev

How to Pause ALL CSS animations?

From Java

How to disable NavigationView push and pop animations

From Dev

How to disable custom animations from click, angular?

From Dev

How do I disable Xcode animations?

From Dev

How to disable custom animations from click, angular?

From Dev

How to disable Metal in Unity

From Dev

Unity - How To Disable Accelerometer?

From Dev

How to disable animations in code when running Espresso tests

From Dev

How to disable WowJS animations from occuring more than once?

From Dev

How do I disable div animations onclick() using jQuery?

From Dev

How to disable RecyclerView item decoration drawing for the duration of item animations

From Dev

How to disable/avoid Fragment custom animations after screen rotation

From Dev

How do i disable page transition animations in windows phone 8?

From Dev

How can I disable animations in Firefox when going full screen?

From Dev

Kendo scheduler, disable animations

From Dev

Disable animations in office 365

From Dev

Kendo scheduler, disable animations

From Dev

Disable CSS animations on Firefox

From Dev

Switching between animations in Unity

From Dev

No Animations in Unity Dock

From Dev

Unity Animations C#

From Java

AWS: How to disable all services?

Related Related

HotTag

Archive