DisplayDroid's primary purpose in life is to sit in your menu bar and wait for an external display to be connected or disconnected. On detecting that event, DisplayDroid will execute the JavaScript or AppleScript that you've enabled in its built-in script editor.
DisplayDroid is ideal for anyone who is continually changing workplace settings - on the road, in the office, giving presentations - and finding they need different apps and system settings depending on whether they are connected to an external display or not.
If you don't know how to write scripts, no problem. DisplayDroid comes with several presets built in, and you can quickly download more at the press of a button from within DisplayDroid's compact interface.
If you're an experienced scripter, you'll find the built-in editor useful not only for creating scripts to run in DisplayDroid itself but also as an impromptu script editor that can be rapidly summoned from the status bar.