An update to domster answer for Ubuntu 12.10.
Unity source code has obviously changed, so here is how to achieve the same in Unity 6.8.0. The steps to download Unity source code are the same as before (I will copy & paste domster's snippet):
sudo apt-get build-dep unity
cd /tmp #It can be done somewhere else, feel free to change the base location.
mkdir unity
cd unity
apt-get source unity
At this point, the file to be edited is only /tmp/unity/unity-6.8.0/plugins/unityshell/src/unityshell.cpp
.
Find the method UnityScreen::InitGesturesSupport()
(line 3368 for Unity 6.8.0).
Then, comment all the lines starting with gesture_sub_launcher to make it look like:
void UnityScreen::InitGesturesSupport()
{
std::unique_ptr<nux::GestureBroker> gesture_broker(new UnityGestureBroker);
wt->GetWindowCompositor().SetGestureBroker(std::move(gesture_broker));
/*
gestures_sub_launcher_.reset(new nux::GesturesSubscription);
gestures_sub_launcher_->SetGestureClasses(nux::DRAG_GESTURE);
gestures_sub_launcher_->SetNumTouches(4);
gestures_sub_launcher_->SetWindowId(GDK_ROOT_WINDOW());
gestures_sub_launcher_->Activate();
gestures_sub_dash_.reset(new nux::GesturesSubscription);
gestures_sub_dash_->SetGestureClasses(nux::TAP_GESTURE);
gestures_sub_dash_->SetNumTouches(4);
gestures_sub_dash_->SetWindowId(GDK_ROOT_WINDOW());
gestures_sub_dash_->Activate();
gestures_sub_windows_.reset(new nux::GesturesSubscription);
gestures_sub_windows_->SetGestureClasses(nux::TOUCH_GESTURE
| nux::DRAG_GESTURE
| nux::PINCH_GESTURE);
gestures_sub_windows_->SetNumTouches(3);
gestures_sub_windows_->SetWindowId(GDK_ROOT_WINDOW());
gestures_sub_windows_->Activate();
*/
}
Re-build Unity following domster's instructions again:
cd /tmp/unity/unity-6.8.0
dpkg-buildpackage -us -uc -nc
cd ..
sudo dpkg -i *deb
Et voila again! Logout and log back in.
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:
(source)To minimize all windows except the active one I refer to the script in this answer (minimise.py).
To manage Easystroke easily you should make it visible in the panel. For that install dconf-tools
, then open dconf Editor and switch to
desktop
→unity
→panel
and to "systray-whitelist" add, 'easystroke'
at the end.Then start Easystroke. To add a new action click the panel icon and in the
Actions
tab clickAdd Action
. Use these parameters: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 onGesture Button
.)To minimize all windows except the active one now just press mouse button 2 and do the action you chose before.
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.