How do I trigger a script when a second monitor is attached
2
votes
2
answers
6486
views
I am on macOS El Captain (upgrading to High Sierra soon) and I'm looking for a tool which can trigger an AppleScript or shell script every time when the number of monitors/displays attached to the system changes.
I have tried [*ControlPlane*](https://www.controlplaneapp.com/) , but could not get the trigger on attached-display-change to work. Two questions:
1) Does anybody know that display triggering in *ControlPlane* definitely works on macOS El Captain and higher? (Indicating that I am doing something wrong.)
Or:
2) Is there another tool which can act on a change of numbers of displays every time a monitor/display is (dis-)connected?
***
**PS**: I am aware there are other questions in the StackExchange network relating to this topic (like [How can I run a script whenever I plug in an external monitor?](https://superuser.com/questions/170545/how-can-i-run-a-script-whenever-i-plug-in-an-external-monitor) or [Reset Mac OS X Windows Position after de-attaching external monitor](https://superuser.com/questions/331/reset-mac-os-x-windows-position-after-de-attaching-external-monitor)) , but the answers do not seem to apply to El Captain/High Sierra .
Asked by halloleo
(1497 rep)
Aug 13, 2018, 04:42 AM
Last activity: Apr 26, 2023, 02:20 AM
Last activity: Apr 26, 2023, 02:20 AM