Ubuntu – Mouse gestures for Unity desktop


I liked the mouse gesture of Windows 7 to minimize all open windows except the active one. Can I have that kind of gestures to use in Unity.

or What are the mouse gestures available for Unity?

Best Answer

For your general question take a look at "What are Unity's keyboard and mouse shortcuts?"

For your special question I suggest Easystroke:

Easystroke is a gesture-recognition application for X11. Gestures or strokes are movements that you make with you mouse (or your pen, finger etc.) while holding down a specific mouse button. Easystroke will execute certain actions if it recognizes the stroke; currently easystroke can emulate key presses, execute shell commands, hold down modifiers and emulate a scroll wheel. The program was designed with Tablet PCs in mind and can be used effectively even without access to a keyboard. Easystroke tries to provide an intuitive and efficient user interface, while at the same time being highly configurable and offering many advanced features.

Install via the software center

  1. To minimize all windows except the active one I refer to the script in this answer (minimise.py).

  2. To manage Easystroke easily you should make it visible in the panel. For that install dconf-tools Install dconf-tools, then open dconf Editor and switch to desktopunitypanel and to "systray-whitelist" add , 'easystroke' at the end.

  3. Then start Easystroke. To add a new action click the panel icon and in the Actions tab click Add Action. Use these parameters:

    • Name: minimize except active
    • Type: command
    • Details: bash -c 'python ~/minimise.py'

    To set a mouse gesture click Record Stroke and then while pressing mouse button 2 move the mouse the way you like for this action in future. Ready.
    (You can change the preferred mouse button in Preferences tab with a click on Gesture Button.)

    easystroke settings

  4. To minimize all windows except the active one now just press mouse button 2 and do the action you chose before.

  5. If you like it add Easystroke to Startup Applications by marking as checked "Autostart easystroke" in the Preferences tab.

How to configure Easystroke you can find out in its Documentation as well as in this Tips & Tricks section.