1
1
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?
1
1
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?
2
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)
1
I've changed the script to work with all panels, including any extra panel created:
#!/bin/bash
panelList=$(gconftool-2 --all-dirs "/apps/panel/toplevels")
for panel in $panelList
do
state=$(gconftool-2 --get "$panel/auto_hide")
if [ $state = "true" ]; then
gconftool-2 --set "$panel/unhide_delay" --type integer "0"
gconftool-2 --set "$panel/auto_hide" --type bool "false"
else
gconftool-2 --set "$panel/unhide_delay" --type integer "100000"
gconftool-2 --set "$panel/auto_hide" --type bool "true"
fi
done