Skip to content

Instantly share code, notes, and snippets.

@lgw4
Created May 29, 2019 22:53
Show Gist options
  • Select an option

  • Save lgw4/fe13a3ed07b9b5a23503faf0558ee0f4 to your computer and use it in GitHub Desktop.

Select an option

Save lgw4/fe13a3ed07b9b5a23503faf0558ee0f4 to your computer and use it in GitHub Desktop.
Rotate Resolution... (MacBook Pro 15" 2016+)
-- Rotate Resolution... (between 1680x1050 and 1920x1200)
-- MacBook Pro 15" Retina 2016+ with Touch Bar, Mojave version
tell application "System Preferences"
reveal anchor "displaysDisplayTab" of pane "com.apple.preference.displays"
end tell
tell application "System Events" to tell process "System Preferences" to tell window "Built-in Retina Display"
click radio button "Display" of tab group 1
click radio button "Scaled" of radio group 1 of tab group 1
tell radio group 1 of group 2 of tab group 1
set isDefault to get value of radio button 4
end tell
if isDefault then
click radio button 5 of radio group 1 of group 2 of tab group 1
else
click radio button 4 of radio group 1 of group 2 of tab group 1
end if
end tell
quit application "System Preferences"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment