I was browsing a reddit group and so a question from someone asking if it was possible to set a shortcut to minimize all the windows in a specific desktop.
I decided to investigate and couldn't find anything so I decided to write a little script to do just that using
- xrandr
- wmctrl
- xdotool
It works as a toggle: run it once and it minimizes the windows of the selected monitor specified, run it again and it restores the windows.
The script considers a window to be "in" a monitor, if the top let corner is within that monitor.
Just make it executable and assign a keyboard shortcut to execute it:
Currently it has a few of minor bugs (that I know of)
- When restoring windows, it restores even windows that were originally minimized.
- There are some screens which report their offset "wrong" so they appear to be outside the window
- It does not validate the input parameter
No comments:
Write comments