[PR #10368] [MERGED] Add Minimize to Tray and Tray Icon #28005

Open
opened 2026-01-31 09:25:43 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10368
Author: @leonMSFT
Created: 6/8/2021
Status: ✅ Merged
Merged: 8/12/2021
Merged by: @undefined

Base: main ← Head: dev/lelian/notifyicon/yougetoneyougetone


📝 Commits (10+)

📊 Changes

34 files changed (+773 additions, -85 deletions)

View changed files

📝 .github/actions/spelling/allow/apis.txt (+7 -0)
📝 .github/actions/spelling/expect/expect.txt (+2 -0)
📝 doc/cascadia/profiles.schema.json (+10 -0)
📝 src/cascadia/Remoting/Monarch.cpp (+77 -10)
📝 src/cascadia/Remoting/Monarch.h (+6 -1)
📝 src/cascadia/Remoting/Monarch.idl (+6 -0)
📝 src/cascadia/Remoting/Peasant.cpp (+37 -2)
📝 src/cascadia/Remoting/Peasant.h (+4 -0)
📝 src/cascadia/Remoting/Peasant.idl (+4 -0)
📝 src/cascadia/Remoting/SummonWindowSelectionArgs.h (+2 -0)
📝 src/cascadia/Remoting/WindowManager.cpp (+52 -0)
📝 src/cascadia/Remoting/WindowManager.h (+9 -0)
📝 src/cascadia/Remoting/WindowManager.idl (+7 -0)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+35 -0)
📝 src/cascadia/TerminalApp/AppLogic.h (+3 -0)
📝 src/cascadia/TerminalApp/AppLogic.idl (+3 -0)
📝 src/cascadia/TerminalApp/Resources/en-US/Resources.resw (+8 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp (+10 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.h (+2 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl (+2 -0)

...and 14 more files

📄 Description

A brief summary of the behavior of the tray icon:

  • There will only ever be one tray icon representing all windows.
  • Left-Click on a Tray Icon brings up the MRU window.
  • Right-Click on a Tray Icon brings up a Context Menu:
Focus Terminal
----------------
Windows --> Window ID 1 - <unnamed window>
            Named Window
            Named Window Again
  • Focus Terminal will bring up the MRU window.
  • Clicking on any of the Window "names" in the submenu will summon the window.

Settings Changes

Two new global settings are introduced: alwaysShowTrayIcon and minimizeToTray. Here's a chart explaining the behavior with the two settings.

alwaysShowTrayIcon:true alwaysShowTrayIcon:false
minimizeToTray:true tray icon is always shown. minimize button will hide the window. tray icon is always shown. minimize button will hide the window.
minimizeToTray:false tray icon is always shown. tray icon is not shown ever.

Closes #5727

References

Spec for Minimize to Tray
Docs PR - MicrosoftDocs/terminal#352
#10448 - My list of TODOs


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10368 **Author:** [@leonMSFT](https://github.com/leonMSFT) **Created:** 6/8/2021 **Status:** ✅ Merged **Merged:** 8/12/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lelian/notifyicon/yougetoneyougetone` --- ### 📝 Commits (10+) - [`150efbb`](https://github.com/microsoft/terminal/commit/150efbb01f2ad9c089c6e7064f90b5148c5fadc5) initial - [`87238e1`](https://github.com/microsoft/terminal/commit/87238e108e74b0dd6ba7921729f33eecbfcc956a) give it a fresh look - [`b3ae922`](https://github.com/microsoft/terminal/commit/b3ae922b7ff29aeea688fd610943f5c6ee71292f) scaffolding for MinimizeToTray action - [`7964b5a`](https://github.com/microsoft/terminal/commit/7964b5a0a732ef365da18e715f451372eca3709d) scoping to quek only - [`eee447c`](https://github.com/microsoft/terminal/commit/eee447cdcc6e521735146cfba0a6914aa359787a) cleanup - [`a83686a`](https://github.com/microsoft/terminal/commit/a83686a66ad6de2f2cf94dd02a806ae989c84b35) using the correct term - [`e8462e0`](https://github.com/microsoft/terminal/commit/e8462e0156a35c0d270eb846239c4ecc138577ae) not sure if necessary, but try not to add every single time - [`b2b76ca`](https://github.com/microsoft/terminal/commit/b2b76ca62a703236c5ac7a0af6a4237818a02177) remove when no longer quake - [`ce22c0c`](https://github.com/microsoft/terminal/commit/ce22c0c45e81850e3e1bf2e62101e10c909ad1ea) pr comments, spelling - [`8fa4718`](https://github.com/microsoft/terminal/commit/8fa47182dd678b4e367d00d5d5f51395e2924438) ok ok ok fine ### 📊 Changes **34 files changed** (+773 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/allow/apis.txt` (+7 -0) 📝 `.github/actions/spelling/expect/expect.txt` (+2 -0) 📝 `doc/cascadia/profiles.schema.json` (+10 -0) 📝 `src/cascadia/Remoting/Monarch.cpp` (+77 -10) 📝 `src/cascadia/Remoting/Monarch.h` (+6 -1) 📝 `src/cascadia/Remoting/Monarch.idl` (+6 -0) 📝 `src/cascadia/Remoting/Peasant.cpp` (+37 -2) 📝 `src/cascadia/Remoting/Peasant.h` (+4 -0) 📝 `src/cascadia/Remoting/Peasant.idl` (+4 -0) 📝 `src/cascadia/Remoting/SummonWindowSelectionArgs.h` (+2 -0) 📝 `src/cascadia/Remoting/WindowManager.cpp` (+52 -0) 📝 `src/cascadia/Remoting/WindowManager.h` (+9 -0) 📝 `src/cascadia/Remoting/WindowManager.idl` (+7 -0) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+35 -0) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+3 -0) 📝 `src/cascadia/TerminalApp/AppLogic.idl` (+3 -0) 📝 `src/cascadia/TerminalApp/Resources/en-US/Resources.resw` (+8 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp` (+10 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.h` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl` (+2 -0) _...and 14 more files_ </details> ### 📄 Description A brief summary of the behavior of the tray icon: - There will only ever be one tray icon representing all windows. - Left-Click on a Tray Icon brings up the MRU window. - Right-Click on a Tray Icon brings up a Context Menu: ``` Focus Terminal ---------------- Windows --> Window ID 1 - <unnamed window> Named Window Named Window Again ``` - Focus Terminal will bring up the MRU window. - Clicking on any of the Window "names" in the submenu will summon the window. ## Settings Changes Two new global settings are introduced: `alwaysShowTrayIcon` and `minimizeToTray`. Here's a chart explaining the behavior with the two settings. | | `alwaysShowTrayIcon:true` | `alwaysShowTrayIcon:false` | |----------------------|------------------------------------------------------------------|------------------------------------------------------------------| | `minimizeToTray:true` | tray icon is always shown. minimize button will hide the window. | tray icon is always shown. minimize button will hide the window. | | `minimizeToTray:false` | tray icon is always shown. | tray icon is not shown ever. | Closes #5727 ## References [Spec for Minimize to Tray](https://github.com/microsoft/terminal/blob/main/doc/specs/%23653%20-%20Quake%20Mode/%23653%20-%20Quake%20Mode.md#minimize-to-tray) Docs PR - MicrosoftDocs/terminal#352 #10448 - My list of TODOs --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:25:43 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28005