-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature-request] Minimize to tray #5727
Comments
Anny ita on picking this up ? |
@NicTanghe Nope, no ETA, as indicated by the milestone of this issue: |
Interested in this as well, as I usually have a lot of windows open and it'd be nice to move this one out of the way. |
This is why I am still using cmder instead of windows terminal. If they add it I will switch to Windows Terminal |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Would it be okay to add a minimize to tray button at the bottom of the New Tab dropdown menu? That would make the feature (and the hotkey) intuitively discoverable as opposed to the right click on close idea which feels like a secret if you don't already come from a cmder background and expect it.
I think that's covered separately by single instance mode (#2227). |
If I could upvote this i would |
@Mystik01 other folks appear to have figured out how to upvote issue comments Please use that. |
If this gets implemented please consider not breaking standard UI behavior by introducing stuff like right-click on close button but instead use minimize so it can be done using keyboard shortcuts as well. |
### ⇒ [doc link](https://github.com/microsoft/terminal/blob/dev/migrie/s/653-quake-mode/doc/specs/%23653%20-%20Quake%20Mode/%23653%20-%20Quake%20Mode.md) ⇐ ## Summary of the Pull Request After reading through 114+ comments in #653 and related issues, I think I've finally wrapped my head around all the possible scenarios for quake mode. <!-- Speak now or forever hold your peace. --> This also includes "minimize to tray", because the two are a powerful combination. With the work already prototyped in [`dev/migrie/f/653-QUAKE-MODE`](https://github.com/microsoft/terminal/tree/dev/migrie/f/653-QUAKE-MODE), [I'm starting to believe](https://j.gifs.com/58vKNx.gif) that we could actually land this in 2.0. ### Abstract > Many existing terminals support a feature whereby a user can press a keybinding > anywhere in the OS, and summon their terminal application. Oftentimes the act of > summoning this window is accompanied by a "dropdown" animation, where the window > slides in to view from the top of the screen. This global summon action is often > referred to as "quake mode", a reference to the videogame Quake who's console > slid in from the top. > > This spec addresses both of the following two issues: > * "Quake Mode" ([#653]) > * "Minimize to tray" ([#5727]) ## PR Checklist * [x] Specs: #653, #5727 * [x] References: #5000, #4472, #2227, #7240, #8135 * [x] I work here ## Detailed Description of the Pull Request / Additional comments _\*<sup>\*</sup><sub>\*</sub> read the spec <sub>\*</sub><sup>\*</sup>\*_
I'm using https://github.com/flyingpie/windows-terminal-quake to put WT in the tray instead of taskbar |
## Summary of the Pull Request This is a scoped implementation of "hide on minimize", only to the `_quake` window. When minimized, the `_quake` window won't appear in the taskbar. IT ALSO WON'T APPEAR IN THE TRAY, BECAUSE WE DON'T HAVE ONE YET. I talked about this with @DHowett, and it seemed cool. Other windows will still minimize normally. ## References * Original thread: #653 * Spec: #9274 * megathread: #8888 * minimize to tray: #5727 ## PR Checklist * [x] Closes https://github.com/microsoft/terminal/projects/5#card-61246940 * [x] I work here * [ ] Tests added/passed * [ ] Requires documentation to be updated - probably yea, but something <sub>something <sub>something</sub></sub> ## Detailed Description of the Pull Request / Additional comments After playing with it, it is in fact, cool. ALSO `LOG_IF_WIN32_BOOL_FALSE` should DEFINITELY not be used with `ShowWindow`. [`ShowWindow`](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow#return-value) returns false if the window was previously hidden, but doesn't `SetLastError`, so that macro will _throw_. ## Validation Steps Performed ```jsonc { "keys": "ctrl+`", "command": { "action": "quakeMode" } }, { "keys": "ctrl+1", "command": { "action": "globalSummon", "name": "_quake" } }, // { "keys": "ctrl+1", "command": { "action": "globalSummon" } }, // { "keys": "ctrl+2", "command": { "action": "globalSummon", "desktop": "toCurrent" } }, // { "keys": "ctrl+2", "command": { "action": "globalSummon", "toggleVisibility": false } }, // { "keys": "ctrl+2", "command": { "action": "globalSummon", "dropdownDuration": 2000 } }, { "keys": "ctrl+2", "command": { "action": "globalSummon", "monitor": "any" } }, // { "keys": "ctrl+3", "command": { "action": "globalSummon", "desktop": "onCurrent" } }, { "keys": "ctrl+3", "command": { "action": "globalSummon", "monitor": "toMouse" } }, // { "keys": "ctrl+4", "command": { "action": "globalSummon", "desktop": "any" } }, { "keys": "ctrl+4", "command": { "action": "globalSummon", "monitor": "toMouse", "dropdownDuration": 500 } }, { "keys": "ctrl+5", "command": { "action": "globalSummon", "dropdownDuration": 500 } }, ```
I'm a little concerned how this interacts with there being multiple terminal sessions (not tabbed), as when some app launches wired to a (new) terminal instance. |
The logic for the tray icon will have to be updated to be smart enough to know when a new window is opened while the tray icon exists for another window and a user decides to minimize that one too, otherwise that window should be ignored. It should also provide the choices to summon a specific window or all windows (we'll need to be careful here as it could cause a large perf impact trying to restore potentially a bunch of windows and ensure they're summoned in a way to keeps resources down as much as possible). |
@WSLUser the task bar already handles the multiple instance case quite nicely, and indicates when there are running instances. I suspect we are asking too much of the tray, which regularly hides some instances it is keeping hot (like Discord which I can't keep from going to the tray, while Zoom at least goes to the task bar and forcing quit is easier). |
Well there are a great many applications where what I've described occurs, usually with some kind of perf cost that can cause the machine (or monitor/GPU at least) to freeze up for a moment. |
This PR is a small start in a broader "Minimize to Tray" feature (#5727). This particular change is scoped only to the scenario when a quake window is minimized. Currently the only way to bring back the quake window when it's minimized is to press the global hotkey again. This gives another option - to press the terminal icon in the tray. Eventually though, minimize to tray will be available for any window, and I'd like more time to flesh out the general porpoise scenarios and context menus. Having just a bit in this PR also helps reviewers by keeping it small!
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
Description of the new feature/enhancement
Add an option to minimize to tray instead of task bar.
It can be a setting when enabled, always minimize the terminal to tray.
I also like the option in cmder where right click on close minimizes to tray in that way i have both the minimize to tray and taskbar available to me always.
It need not be exactly like right click on close button, it can be a shortcut too.
On reopening of terminal minimized to tray:
It'd be good if opening of terminal from taskbar icon reopen the minimized instance of terminal and not a new one. Though i can work around it using the win + b shortcut.
The text was updated successfully, but these errors were encountered: