DualHead Watchdog is a Linux desktop app which runs commands or scripts after display settings are changed.