Disable Extended Displays with AppleScript

I can see Mac Ports does still seem to offer this. Will have a look. Thanks.

Furthering my experiments with Display Menu app, I expanded my code to switch the set up to mirroring which DOES give me a single screen to Remote Desktop to. Only downside, which is still not great is that toggling mirroring off again, arranges the displays side by side instead of original layout; the 4k sitting over the top of the two 1080ps which were side by side. I suspect this is where xrandr could help with it’s placement capability.

on run {input, parameters}
	tell application "Display Menu"
		
		toggle mirroring
		
		set theResolution to current resolution on display "Unknown Display"
		
		select resolution "1600x900" on display "Unknown Display"
		
	end tell
	
end run