DisplaySystemTray

One-click display modes and saved monitor layouts from the Windows tray.

Role
Design and engineering
Areas
Tools, Apps

Changing between a docked setup, a single laptop screen and a recording layout usually means a trip through Windows display settings. DisplaySystemTray puts it in the tray menu.

Four-layer diagram of DisplaySystemTray: the tray menu, settings window and command line call the quick-mode, snapshot-and-restore and JSON config store components, which call QueryDisplayConfig, SetDisplayConfig and DisplayConfigGetDeviceInfo through P/Invoke, which reach the Windows CCD display API.
Every route into the app, tray, settings or command line, ends at the same documented Windows display API.

The menu offers Extend, Show only on 1 and Show only on 2, plus any number of saved configurations. Rather than reimplementing every display option, the app snapshots whatever has already been arranged in Windows, including active displays, resolutions, refresh rates, positions and orientation, and restores it on demand. If a saved layout's monitors aren't connected, it names the missing displays and changes nothing.

Six-step flow: arrange the displays in Windows Settings, save the active paths and modes with a name for each monitor, store them as JSON with atomic locked writes, remap adapter IDs by monitor device path at restore time, stop and name any missing monitor, then apply the configuration with SetDisplayConfig.
Adapter IDs change between boots, so a saved layout is matched to monitors by device path before it's applied.

It's C# on .NET 8, published as one self-contained exe. Display control goes straight to the Windows CCD API (QueryDisplayConfig and SetDisplayConfig), not undocumented switches. Configurations are stored as readable JSON with atomic, cross-process-locked writes, and adapter IDs are remapped by monitor device path when restoring, so saved layouts survive reboots. The same exe works as a command-line tool with documented exit codes, which makes it easy to bind to hotkeys and scripts.

Grid of DisplaySystemTray command-line verbs: --apply with extend, internal, external or clone; --current; --save and --restore; --list and --delete; --validate and --selftest; and exit codes 0 for success, 1 for a failed or inapplicable operation, 2 for a usage error and 3 for an unexpected error.
The command line can also switch to clone mode, which the tray menu doesn't offer yet.