Displays Changed --> Toggle App (Launch/Quit)

A preset to toggle (quit or launch) an app when a display is connected or disconnected

Displays Changed --> Toggle App (Launch or Quit).bttpresetzip (25.7 KB)

This BTT preset quits or launches an app of your choice (with dialog confiramtion) when an external display connects or disconnects.

I'm finding this useful since I'd prefer not to have my menubar manager (Barbee, Ice, Bartender, etc.) running when I'm using an external display, and I want to be reminded to enable it again when I to only my macbook display.

Setting up:

  1. Open the trigger folder under "Automations, Named, and Other Triggers"
  2. Select the trigger "Settings: app name and quit/launch preference"
  3. In the first Set Value action, enter the name of your chosen app in the Value field:

  1. In the second Set Value action, enter either "quit" or "launch" (without quotes) in the Value field.

This is what the preset will do when a display is connected. (And when a display is disconnected, it will do the opposite option).

  1. Click "Save".

The chosen app is never quit or launched automatically. First a dialog pops up, where you can confirm or cancel the action.

The preset also does its best to clear any lingering dialogs of its own that have been previously ignored, and it includes triggers for before the Mac goes to sleep and after it wakes up.

Release Notes:

  • 2025-05-12:
    • refactor javascript
    • store javascript as preset file
    • rename preset without / in title
  • 2025-05-12
    • initial release