Home » Questions » Computers [ Ask a new question ]

Is there a shortcut key in Gnome to show hidden panels?

Is there a shortcut key in Gnome to show hidden panels?

I've set my panel to autohide. I can make it reappear by moving my pointer to the bottom of the screen, but, I'd also like to assign a shortcut key to do the same thing. Is there any way to do that?

Asked by: Guest | Views: 135
Total answers/comments: 1
Guest [Entry]

"This should do the trick.

Long story short:

1- write a short script (yourtogglescript.sh) that toggle the hide status in gconf:

#!/bin/bash
#find the current state of the panels
state=`gconftool-2 --get ""/apps/panel/toplevels/top_panel_screen0/auto_hide""`
#if autohide on, turn it off
if [ $state = ""true"" ]; then
gconftool-2 --set ""/apps/panel/toplevels/top_panel_screen0/unhide_delay"" --type integer ""0""
gconftool-2 --set ""/apps/panel/toplevels/top_panel_screen0/auto_hide"" --type bool ""false""
gconftool-2 --set ""/apps/panel/toplevels/bottom_panel_screen0/unhide_delay"" --type integer ""0""
gconftool-2 --set ""/apps/panel/toplevels/bottom_panel_screen0/auto_hide"" --type bool ""false""
fi
#if autohide off, turn it on
if [ $state = ""false"" ]; then
gconftool-2 --set ""/apps/panel/toplevels/top_panel_screen0/unhide_delay"" --type integer ""100000""
gconftool-2 --set ""/apps/panel/toplevels/top_panel_screen0/auto_hide"" --type bool ""true""
gconftool-2 --set ""/apps/panel/toplevels/bottom_panel_screen0/unhide_delay"" --type integer ""100000""
gconftool-2 --set ""/apps/panel/toplevels/bottom_panel_screen0/auto_hide"" --type bool ""true""
fi

2- Make your script executable:

chmod +x yourtogglescript.sh

3- create a gnome keyboard shortcut with System -> Preferences -> Keyboard shortcuts using the following command:

/path/to/yourtogglescript.sh

Alternatively you can put yourtogglescript.sh in the PATH (~/bin for example) and simply use

yourtogglescript.sh

as your keyboard shortcut command

(you might want to adjust the delays to fit your usage)"