I only want to execute a certain action with xdotool if the window is not visible to the user, this includes minimized windows, but also windows which are 100% covered by other windows (if no transparency is used at least). Ignoring the transparency issue is there a simple way to do this?xdotool has a --onlyvisible option, but that only includes minimized windows, not covered windows. Of course there is the option of cycling through all visible windows, getting their window geometries and calculating how much of the window of interest they cover, but I do hope there is an easier and faster solution than doing this in bash.Here is a nice illustration of the problem, but there it is only about listing windows, also it is for Max OS X. This question only has an answer which hints, but not shows how to do it by listing all visible windows with their respective z-order and calculating the visible area manually.
X: Find out if a window is visible to the user i.e. not covered by others
x11;xdotool