When opening programs like GIMP, I find having background windows open distracting because GIMP has three separate windows associated with it.
It's a burden to have to go to every other non-Gimp window manually to minimize it. What I need is a keyboard shortcut in Ubuntu that matches Windows' Super + Home shortcut. One that minimizes all windows except the active one.
Is it possible to achieve this behavior in Ubuntu?
Best Answer
It is possible to achieve this with a python script. The script requires
python-wnck
andpython-gtk
to be installed in order to work, although I think these are installed by default anyway.Copy and paste this into a text editor and save in a sensible place (eg. as minimise.py in your home folder):
You can then set up the keyboard shortcut by opening Keyboard Shortcuts.
Click on Add to create a new shortcut.
Use the command
bash -c 'python ~/minimise.py'
(this is assuming you saved it as minimise.py in your home folder).You can then assign your preferred keyboard combination to this action.
The script will minimise all non-active windows. I don't think this is very useful for your use case because you will want to have all of the Gimp windows open. You can use a slightly different script to minimise all windows that aren't from the current application instead: