I know how to minimize/hide all windows in Cosmic Cuttlefish/GNOME Shell using SUPER+D, but I would like to be able to quickly minimize only all windows for a single application (say the one that currently has cursor focus). For example, I would like to minimize all LibreOffice documents, or all Terminal windows.
I am not quite seeing or recognizing a way to do this in Settings > Devices > Keyboard. Is this possible?
Best Answer
OK, just a quick one for fun :)
Minimize windows of currently active application
You could use a stripped-down/edited version of this script, which comes with a default Ubuntu Budgie install. While the original script toggles the desktop, the edited one below minimizes all windows, on current workspace, of the currently active
WM_CLASS
.The script, how to use
Make sure you have both
xdotool
andwmctrl
installed:minimize_current.py
Create a keyboard shortcut to run the script and you're done :). Use the command:
The script
Note
Note that
xdotool
norwmctrl
, as used in this script, will work on Wayland.