Last active
May 18, 2022 17:06
-
-
Save altercation/b8240e3562c7f5da2ed4315b63204d12 to your computer and use it in GitHub Desktop.
Applescript to call dispreset when connected to multiple displays
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I use EventScripts to call this on screen unlock | |
# https://www.mousedown.net/software/EventScripts.html | |
tell application "Image Events" | |
launch | |
set countDisplays to count displays | |
if countDisplays > 1 then | |
do shell script "/usr/bin/curl \"http://192.168.0.99:3091/button-mbp-docked-unlock-trigger?event=click\"" | |
do shell script "/Users/es/bin/dispreset" | |
end if | |
quit | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment