KeyRoutines
TriggerFreetrigger.display.changed

Run a routine when you plug in or unplug a monitor

Display changed starts a routine when your monitors change: one is plugged in or unplugged, the laptop docks or undocks, or the resolution, arrangement, scaling or main monitor changes. It's the trigger for "put my windows back when I dock".

How it works

  • Choose which changes start it: monitors connecting or disconnecting (the default), only connecting, only disconnecting, settings changes, or any change.
  • In the advanced settings you can limit it to changes that involve one particular monitor.
  • Docking sends a burst of signals, so KeyRoutines waits about a second and a half for things to settle and fires once for the real change.
  • The routine gets a summary such as which monitor connected, the monitors added, removed and changed, and the full list of monitors now on.

Routines that use it

Re-apply the desk layout

When a monitor connects, Apply layout "Desk" moves your editor, browser and chat back onto their screens.

Undock cleanly

When a monitor disconnects, Show desktop minimizes the clutter and Set default audio device returns to the laptop speakers.

TV mode

When the living-room TV connects, Set default audio device sends sound to it and Dark or light mode switches to dark.

Settings

SettingWhat it does
OnWhich changes start the routine.
MonitoradvancedOnly when this monitor is involved (by its name or saved id).

Questions

How do I restore my window layout after docking on Windows 11?
Make a routine with Display changed set to "connected" and an Apply layout or Restore layout step. Every time you dock, your windows go back where they belong.
Does it fire for resolution or scaling changes?
Yes, if you choose "settings" or "any change". The default only fires when monitors are connected or disconnected.

Pairs well with

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.