I need to know if an application is running and is visible to the user or if is running but minimized (not visible to the user)
I am able to get the pid of my application with
pgrep studio but I cannot figure out how to solve the problem described above.
I tried also to get more info with
ps -O -pid 5439 but it seems that I cannot get the info I need