Disable the auto-hide functionality of Ubuntu Unity 2D

The current version of Unity 2D that comes with Ubuntu 11.04 Beta 2 does not feature any sort of configuration panel and unfortunately there is no easy way to disable the auto-hide feature of the Unity 2D panel. Here is a short script that will give you an icon on your Unity panel to toggle (enable or disable) the auto-hide functionality:

Copy the following script to
/usr/local/bin/unity-2d-toggle-autohide.sh :

  1. #!/bin/sh  
  2.   
  3. if [ $(gconftool-2 --get /desktop/unity-2d/launcher/hide_mode) -eq 0 ]then  
  4.         autoHide=1  
  5.         useStrut=false  
  6. else  
  7.         autoHide=0  
  8.         useStrut=true  
  9. fi  
  10.   
  11. gconftool-2 --typetype=int --set /desktop/unity-2d/launcher/hide_mode $autoHide  
  12. gconftool-2 --typetype=bool --set /desktop/unity-2d/launcher/use_strut $useStrut  

Now create a menu entry for this helper script and save it as
/usr/share/applications/unity-2d-toggle-autohide.desktop :

  1. [Desktop Entry]  
  2. Name=Toggle Unity 2D Panel Auto-Hide  
  3. Comment=Enabled or disables Unity 2D's panel auto-hide functionality  
  4. Icon=gnome-fs-desktop  
  5. Exec=unity-2d-toggle-autohide.sh  
  6. Terminal=false  
  7. Type=Application  
  8. Categories=Utility  

Finally from the Terminal start nautilus /usr/share/applications and add the new entry “Toggle Unity 2D Panel Auto-Hide” to your Unity 2D panel via dragging and dropping.

Clicking on it will toggle auto-hide.

One thought on “Disable the auto-hide functionality of Ubuntu Unity 2D

  1. Cool! Thank You. The only thing I had to modify was line 11 and 12 in the script, “–type=” instead of “–typetype=”.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.