system_profiler SPDisplaysDataType or defaults read /Library/Preferences/com.apple.windowserver.plist
Link:
https://stackoverflow.com/questions/20099333/terminal-command-to-show-connected-displays-monitors-resolutions
system_profiler SPDisplaysDataType or defaults read /Library/Preferences/com.apple.windowserver.plist
Link:
https://stackoverflow.com/questions/20099333/terminal-command-to-show-connected-displays-monitors-resolutions