Detect when computer is running a game or an application is fullscreen

Is there anyway to detect and notify Home Assistant when a game is running or if it’s easier when a program is fullscreen. I have HASS installed on the computer but it doesn’t seem to have the option to detect if program is full screen.