This posting is older than 6 months and can contain outdated information.
If you are using SwitchResX, you can use this Applescript to enable/disable a display
tell application "SwitchResX Daemon"
if enabled of display 2 is false then
set enabled of display 2 to true
else
set enabled of display 2 to false
end if
end tell
you need to change the number of the display to that appropriate.
I use this in combination with a very small other script
Tell Application "Plex"
activate
end tell
to start and activate plex.