1

I quite often use applications in full screen mode. There are several situations, but the most common is during presentations. At such times, I need to quickly toggle this mode, but don't always have ready access to the keyboard, but have a mouse that I can carry with me. I'm working to customize my desktop for much greater efficiency and adding a clickable full screen button either to the window buttons in xfwm4 or to a panel would be very useful.

Is there a simple way to add a clickable button to XFce so that I can toggle full screen mode from the mouse? Ideally, this needs to be also accessible when the window is in full screen mode, so I can exit out of it too.

Village
  • 4,655
  • 14
  • 46
  • 80

1 Answers1

2

As of version 4.14.0, xfwm does not offer the functionality to add a 'fullscreen' button to window decoration. Even if it did though, window decorations disappear in fullscreen mode, so it could not be used to turn the mode off. The same caveat applies to solutions using panel widgets and even always-on-top overlay windows.

If you want a bidirectional toggle for fullscreen mode easily accessible by mouse alone, the best you could probably do is bind an extra mouse button to that action, if your mouse has any. For that purpose, you can use the pair of programs xbindkeys and wmctrl.

First, install both programs. Ensure xbindkeys is set up to launch when session starts (xfce4-session-settings, tab 'Application Autostart'; your distro's packages may set it up automatically on install). Then put the following in ~/.xbindkeysrc:

"wmctrl -r :ACTIVE: -b toggle,fullscreen"
m:0x0 + b:NNN

replacing NNN with the number corresponding to the mouse button of your choice. If you don't know that number, you can discover it using xev: launch xev -event button in a terminal window, click that button while hovering over xev's window and read out the number from the message that appears.

If you don't care that much about turning fullscreen mode off, you can simply create a panel launcher that starts the wmctrl command mentioned above.

user3840170
  • 1,813
  • 5
  • 25