Switch connected external display on and off with script/otherwise

I wonder if there is a way to switch the connected external display on and off with script/otherwise.

1 Like

So far I found DisableMonitor, but it was not updated since 2015 and when I tried it, shut down both external and internal displays.

Another app is SwitchResX appears to work. I am trying to figure out some glitches. It can work with AppleScript. But the price of $16 is too steep for it does.

Did anyone found other solutions?