Skip to content

Instantly share code, notes, and snippets.

@Gurpartap
Created October 26, 2020 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gurpartap/37f6d3f47a6e5320f319fa7b8c466992 to your computer and use it in GitHub Desktop.
Save Gurpartap/37f6d3f47a6e5320f319fa7b8c466992 to your computer and use it in GitHub Desktop.
Display Rotation Toggle (Landscape/Portrait) AppleScript Shortcut Script for LG Ultrafine 5K Display
tell application "System Preferences"
quit
delay 0.3
launch
activate
reveal pane id "com.apple.preference.displays"
tell application "System Events"
tell process "System Preferences"
delay 0.3
tell window "LG Ultrafine"
click pop up button "Rotation:" of tab group 1
if value of pop up button "Rotation:" of tab group 1 is "Standard" then
keystroke "90" & return
else
keystroke "Standard" & return
end if
end tell
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment