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
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
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:
Commands for Xfce 4.10:
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.Try this workaround:
Install
xte
andxdotool
withsudo apt-get install xdotool xautomation
You can use
xdotool
to find the x,y coordinates of the mouse. Open a terminal typexdotool getmouselocation
then move the mouse somewhere where it will activate the panel and hit enter. You will get some output like:What's important here is:
x:1282 y:1079
, which gives us the x,y coordinates of the mouse.Now type
xte 'mousemove 1282 1079'
(replacing1282 1079
with the coordinates you got earlier). That should move the mouse where you want.You can use
xbindkeys
to bind this command to a key on the keyboard. I can add instructions upon request or you can set it in Xubuntu's keyboard settings.Edit:
@JQuigley pointed out "This no longer works..." see comments.
As Kevin said, you can use xfconf, but I'd do it this way:
The
-T
toggles the true/false value. This way, you can use the same key to hide/unhide.To get more options do:
I wanted to make a comment to the answer from Kevin, since it's what got me on the right track. But I'm new here, not enough reputation..
I know I'm a couple of years late to the party, but just for anyone who might see this in the future: Here is a bash script that toggles autohide in the new system, simply save this in a text file somewhere, run
chmod +x file/that/i/saved
and set the script to a key in Settings -> Keyboard -> Shortcuts.topisani's script above still works well in xfce 4.12. You can change the target panel by changing
panel-0
in the script topanel-1
orpanel-2
etc. Don't forget that there are two lines to change.EDIT:
It's been pointed out in a comment that the autohide property has been changed to something else, and -T doesn't work with the new one :/
So, while I was fooling around with this, I made a little ruby script to toggle all panels at the same time. It seems to work.
It's probably not the best way to do it, and I don't really know much about ruby, so feel free to throw me in the fire! :P
If Someone want's to use it:
make sure you have ruby installed.
copy it to a file wherever you see fit (I have mine as
~/scripts/xfce/toogleautohide.rb
).Make it executable
I have tried both 1. moving cursor with
xdotool mousemove_relative
and 2. changing panel property hide=always/never withxfconf-query -c xfce4-panel
. But the best behavior was with 3. changing x window state. Script example:Here i find out which panel to process by y coordinate, you may need your own check e.g. by x coordinate or by width/heigth (see what
xdotool
can get). Also do not forget to set "Dont reserve space on borders"=true in panel properties, or other windows will be changing their own sizes.