I'm writing a script that will run as a daemon. I need to check when there's a maximized window in focus on the screen, and when the window in focus isn't maximized and run my script (bash) in both situations. Could anybody help me?I'm writing a script that will run as a daemon.