How can you check if a window is minimized through a terminal in Linux?

How can you check if a window is minimized through a terminal in Linux?

+3
source share
3 answers
<Preview> xwininfo -name 'Window Name' | grep 'Map Status:

Find IsViewable compared to IsUnMapped ; they are taken from the map_state field returned by XGetWindowAttributes .

(At least this works with traditional window managers; I don't know if Compiz can screw things up to allow miniature minimized windows.)

0
source
 if xwininfo -all -id $windowIdGoHere |grep "Hidden"; then echo "is hidden" fi 
0
source
 [ $(xwininfo -id 0x60001d -all | awk '/Maximized/{print}' | wc -l) -eq 2 ] && echo Maximized 

where 0x60001d is the window identifier. See xwininfo -h for other ways to identify a window for testing.

0
source

Source: https://habr.com/ru/post/1272427/


All Articles