Ubuntu – Can I unhide the panel in Xfce using a key press rather than using mouse cursor hover to reveal it


I would like to be able to unhide the Xfce panel by pressing a key instead of placing the mouse cursor at the edge of the screen.

I'm running Xubuntu 12.04 but updated to Xfce 4.10

Best Answer

  • Take the following commands and bind them to separate Super-key combinations:

    Commands for Xfce 4.12 through Xfce 4.14:

    The following commands are now used to set the auto-hide properties:

    xfconf-query -c xfce4-panel -p /panels/panel-0/autohide-behavior -s 0
    xfconf-query -c xfce4-panel -p /panels/panel-0/autohide-behavior -s 1 
    xfconf-query -c xfce4-panel -p /panels/panel-0/autohide-behavior -s 2

    Commands for Xfce 4.10:

    xfconf-query -c xfce4-panel -p /panels/panel-0/autohide -s false
    xfconf-query -c xfce4-panel -p /panels/panel-0/autohide -s true

    Update: 12/09/2018: As mentioned in the comments, the above commands are no longer supported.

    Command Values:

    The value '0' is used for 'never' auto-hide. Value '1' is for 'intelligently' auto-hiding the panel, and '2' is used to set the value to 'always' auto-hide.

    Setting the key-bindings:

    This can be done by either selecting, Applications Menu → Settings → Keyboard → Application Shortcuts, or by running xfce4-keyboard-settings from the command line(Ctrl+Alt+t).

    I've bound the first command to Super+u (to 'unhide' the panel). For the second command, I am binding Super+h (to 'hide' the panel).

    As you can see in the commands above, the behavior is only changed on a single panel(In this case, panel-0 is being modified).

    You may notice a slight delay while the panel changes state.

    More details on the xfconf-query command can be found in the Xfce documentation or from this thread in the Xfce forum.