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?
1 Answers
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 (archived).
Step by step instructions as follows.
Open the file manager and go to the Home directory of current user
/home/USERNAME.Go to View > Show Hidden Files (or use keyboard shortcut Ctrl+H).
Find a file named
.gtkrc-2.0and open with a text editor. If the file doesn't exist, create an empty file and rename accordingly.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"Save and close the file.
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 toXicon, then bring theXcursor 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, 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.
False animation: Delay autohide 100 miliseconds (top) and 900 miliseconds
While delay is nothing fancy, I found that 900 miliseconds of delay is comparable alternative to standard animation of hiding a dock.
True animation: Dock
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.
I mentioned this dock as a 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).
Answerer's note: This answer was written when Xfce still had GTK+ 2 components, which means the delay autohide will not work in Xfce 4.12 and newer.



