A lightweight Windows system tray application that lets you quickly switch between display modes (PC only, Duplicate, Extend, Second screen only) using the built-in DisplaySwitch.exe tool.
- Runs silently in the system tray (notification area).
- Simple context menu with options:
- PC screen only (
/internal) - Duplicate (
/clone) - Extend (
/extend) - Second screen only (
/external) - Open Display Settings (shortcut to Windows settings)
- Exit
- PC screen only (
- Auto-scaled tray icon (light and dark mode support).
- Prevents multiple instances via a global mutex.
- Secure by design:
- Uses absolute path to
DisplaySwitch.exe. - Only allows whitelisted arguments.
- Uses absolute path to
- Windows 10 / 11
- .NET 8.0 SDK (to build from source)
# Clone the repo
git clone https://github.com/KiraFR/TrayDisplaySwitch.git
cd TrayDisplaySwitch
# Build in Release mode
dotnet build -c Release
# Run directly
dotnet run -c Release
# Or start the built .exe
./bin/Release/net8.0-windows/TrayDisplaySwitch.exeTo create a single self-contained executable:
dotnet publish -c Release -r win-x64 `
-p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained trueThe binary will be located at:
bin/Release/net8.0-windows/win-x64/publish/TrayDisplaySwitch.exe
- Launch
TrayDisplaySwitch.exe. - The app appears in the system tray (near the clock).
- Right-click the icon → select your desired display mode.
You can configure TrayDisplaySwitch to start automatically when Windows boots.
- Press
Win + R, typeshell:startup, and press Enter. - Copy the
TrayDisplaySwitch.exefile (or a shortcut to it) into the Startup folder that opens. - Restart your computer → the app will now launch automatically.
- Absolute path to
DisplaySwitch.exeprevents path hijacking. - Hardcoded whitelist of valid arguments.
- Runs as
asInvoker(no elevated privileges required). - Embedded icon (no external resources).
This project is licensed under the MIT License.