I'd like to write a cron job to detect when the TV is off and kill a bunch of programs - chrome, vlc, etc. This is because my bandwidth is limited and I don't want it to continue streaming when the TV is off. Does anyone know how I could go about detecting monitor off/hdmi unplugged?
xrandr doesn't seem to suit my needs because it has to be run as a user with a $DISPLAY. So it wouldn't work in a script.
Assume I have no CEC over HDMI.