How can you check if a window is minimized via the terminal in linux?
3 Answers
xwininfo -name 'Window Title' | grep 'Map State:'
Look for IsViewable versus IsUnMapped; these come from the map_state field returned by XGetWindowAttributes.
(At least, that works with traditional window managers; I don't know if Compiz does screwy stuff to allow for thumbnailing minimized windows.)
2 Comments
Skippy le Grand Gourou
It won't work with Enlightenment (e17), where the
map_state seems to be always IsViewable (this is a feature, which allows for instance screen captures of hidden windows).Avio
Doesn't work either on Ubuntu 13.04 with Compiz. The result for some window is
Map State: IsViewable, for others is Map State: IsUnMapped, but this field seems not related to the actual visibility (normal or minimized) of a window.