How can I sleep my iMac's internal display when it's not in use, but not my attached tv (playing video) I've got a 2015 iMac running Yosemite, attached via HDMI to a 1080p TV, in extended desktop mode that I use simultaneously as a video server/media player and an occasional work machine. 

In short, I'd like to sleep the internal display but not the external on demand. 

More detail: I'd like to be able to run a video player (Plex) in full screen mode on the TV (Screen 2), but set the internal display (Screen 1) to automatically sleep if I'm not doing anything else on the computer but playing video on Screen 2.

Apps like Plex have an option to blank the other screen, but that doesn't work here, as I'd like to be able to use Screen 1 some of the time. I used to make this work on my old Mac Pro by simply turning the computer monitor off but leaving the TV on, but that's not an option with the iMac. 

Something akin to an off switch (or hotkey) for the the internal display (that doesn't disable the desktop) would be perfect, as I often remotely control Screen 1 from another computer while video is playing on Screen 2. 

Have tried SwitchResX, which is great, but it doesn't seem to have the right combination of settings/features to meet my goals (or I've failed to figure them out). 

Any advice would be appreciated. Thanks!
DisableMonitor

I found an open source project called DisableMonitor and it worked for me on macOS 10.12, Sierra, as well.




  Warning
  
  It has been reported that the software is able to cause irretrievable damages to your computer.
  Use at your own risk!
  
  The project development has been stopped and won't be continued, if you want to be a maintainer consider opening an issue.