4

Is there a way to assign a keyboard shortcut to hide or unhide a specific gnome-panel?

EDIT: Is there was a way to make a button combination have the auto-hide panel slide out, as if I had hovered my mouse on that side of the screen?

1
  • Great question! I want to know this too! Nothing i could find in either compiz or keyboard shortcuts
    – MestreLion
    Commented Apr 7, 2011 at 23:47

1 Answer 1

4

There is a trick to do that.

Part One - How to hide/show all gnome panels

1) Make this file:

gedit ~/.gpnaelhs

2) Paste this into it:

#!/bin/bash

count=0
while read line
do
   keys[$((++count))]="${line}/auto_hide"
done <<EOF
$( gconftool-2 --all-dirs "/apps/panel/toplevels" )
EOF

case $( gconftool-2 --get "${keys[1]}" ) in
   "0" | "false" | "False" )
      new="true"
      ;;
   * )
      new="false"
      ;;
esac

for key in "${keys[@]}"
do
   gconftool-2 --set "$key" --type bool "$new"
done

#End of File  

3) Save.

4) Make it executable:

sudo chmod +x ~/.gpnaelhs

5) Make a shortcut for it:

gnome-keybinding-properties  

6) Click "Add" and put a name (p. ex. "Gnome Panel Hide - Unhide") and the command

bash -c '~/.gpnaelhs'

enter image description here

7) Click "Ok"

8) Click "Disable" and choose your shortcut (p. ex. Ctrl + P

Part Two - How to hide/show only one gnome panel

1) First please backup your settings

gconftool --dump /apps/panel > ~/.panel.settings.backup.xml

and

mkdir ~/.panel.folders.backup && cp -r ~/.gconf/apps/panel/toplevels/ ~/.panel.folders.backup/

2) Now we have to do 2 things. First: edit the file ~/.gpnaelhs and change "/apps/panel/toplevels" for "/apps/panel/toplevels/panel_0" (change the number as needed).

3) Then: delete the folders named panel_0 or panel_1 or panel_2 ... at /apps/panel/toplevels.

Enjoy!

Reference.

3
  • Thanks a lot! It works, except for one thing; when banishing the panel that is on auto-hide, applications will fill up the entire space of the screen, even if there is a panel on top that isn't set to auto-hide. I was wondering if there was a way to make a button combination have the auto-hide panel slide out, as if I had hovered my mouse on that side of the screen.
    – John
    Commented Apr 8, 2011 at 21:40
  • 1
    Now that he's edited his question you can just integrate that comment into your answer. Commented Apr 9, 2011 at 4:07
  • Edited the answer to add what you want. I've deleted my comments to make the page more clean ;-)
    – desgua
    Commented Apr 9, 2011 at 18:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .