Shortcut to change Launcher 'Hide' setting
Solution 1:
You can run
gconftool-2 --type int --set "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode" 2
to set the launcher hide mode to "Dodge Windows", and
gconftool-2 --type int --set "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode" 0
to set it to never hide.
The mode numbers are:
- 0 - Never
- 1 - Autohide
- 2 - Dodge Windows
- 3 - Dodge Active Window
You can make this a switch by just calling (the value must be 2 or 0 before):
gconftool-2 --type int --set "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode" $((2 - $(gconftool-2 --get "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode")))
You then would create a new keybinding (Alt + F2 → gnome-keybinding-properties
) with the command being:
/bin/bash -c "gconftool-2 --type int --set "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode" $((2 - $(gconftool-2 --get "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode")))"
Solution 2:
If you are using Ubuntu 15.04 (vivid) the following commands should work for you.
To enable launcher auto-hide setting use:
dconf write "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode" 1
To disable it use:
dconf write "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode" 0