2

I am running Ubuntu with Unity. I also have an xfce panel installed on top of it. I have set it to autohide, but when it does it is blinks in/out of existence. I have tried setting an animation for the window class in compiz, with no luck. How can I add some decent animations to the xfce panel?

2

In Xfce, there is no option for animation like what can be done in GNOME, KDE and Cinnamon. However, it is possible to introduce some delays to autohide the Xfce panel.

Delay autohide for Xfce panel

To delay autohide for Xfce panel, edit the .gtkrc-2.0 file and add the code block of style "xfce-panel-window-style" as noted in this Xfce Docs. Step by step instructions as below.

  1. Open the file manager and visit the Home directory (/home/USERNAME).

  2. In the menubar of file manager, look for menu called Show Hidden Files (or use keyboard shortcut Ctrl+H).

  3. Find a file named .gtkrc-2.0 and open with a text editor. If the file doesn't exist, create an empty file and rename accordingly.

  4. Then, paste the following codes into the file.

    style "xfce-panel-window-style"
    {
      # Time in miliseconds before the panel will unhide on an enter event
      # original value: 225
      XfcePanelWindow::popup-delay = 225
    
      # Time in miliseconds before the panel will hide on a leave event
      # original value: 350
      XfcePanelWindow::popdown-delay = 900
    
      # Size of autohide window in pixels
      # original value: 3
      XfcePanelWindow::autohide-size = 10
    }
    
    class "XfcePanelWindow" style "xfce-panel-window-style"
    
  5. Save and close the file.

  6. Finally, restart Xfce panel.

To restart Xfce panel, user can do either one of these:

  • Run xkill (or use keyboard shortcut Ctrl+Alt+Esc), the mouse cursor will change to X icon, then bring the X cursor and click on the Xfce panel, then Xfce panel will disappear and restart automatically.

  • Open Terminal, run killall xfce4-panel; xfce4-panel & and finally close Terminal.

There is no need to logout or reboot at all.

Delay isn't animation

It is important to understand that delay is not animation, and vice versa. Delay is to make something happen after certain time, usually given in miliseconds (1000 miliseconds = 1 second). By introducing some delays, user will less likely to go panic and less likely to lose track of autohide panel.

Delay autohide: 100 miliseconds (left) and 900 miliseconds

Xfce panel autohide delay 100ms Xfce panel autohide delay 900ms

While delay is nothing fancy, I found that 900 miliseconds of delay is comparable alternative to standard animation of hiding a dock.

Panel + Animation = Dock

Plank autohide with standard animation

An example is Plank, a simple and lightweight dock. This dock features animation that can be noticed when autohide, as well as options for hide delay and unhide delay. See the screenshot below.

Plank Preferences Behaviour

I mentioned this dock not for recommendation, but as good example to show the difference between animation and delay. Animation is usually hardcoded and not configurable, which is exactly why user will not see any option for animation, unlike delay.

Disclaimer

I have modified value for popdown-delay to 900 and also autohide-size to 10 for more optimal experience, which will make user aware of the panel existence prior to hiding the panel and even after it hides. User experience may vary and GIF images are more or less accurate.

Tested working in Xubuntu 14.04 (Xfce 4.10).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.