microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.94k stars 8.35k forks source link

Avoid closing window when close last tab. #6276

Open aixfox opened 4 years ago

aixfox commented 4 years ago

Description of the new feature/enhancement

Avoid closing window when close last tab.

Proposed technical implementation details (optional)

Keep terminal window when 0 tabs exist, not be concern about the last tab how to be closed.

Features/News/Terminal list, are good contents in the empty window view.

Like Firefox/Chrome/ConEmu which is popular tab manager does.

electronic-dk commented 4 years ago

I believe this issue covers exactly this

aixfox commented 4 years ago

I believe this issue covers exactly this

Same proposal in a sense.

But views of #4579 #2976 #627 are tabs, not window, they are different concepts. Behavior confirm or prevent of tabs are meaningless.

zadjii-msft commented 4 years ago

I actually don't hate this. But we'd probably need to get something like #3586 in first, so that we could just re-use that UI as the "pick a profile" UI.

WSLUser commented 4 years ago

I expect the window to close when there is only one tab open and I close it (the last tab as I see it). I have no idea what would still show in the window if there are 0 tabs, perhaps a black empty space that supports no input other than opening a new tab via drop-down menu? This doesn't seem all that useful to me and actually a deterrent. I wouldn't close Terminal without good reason, such as a reboot or adding a WSL distro since we're still waiting for support on hot-loading distros that are added to the profile list (and appearing in the drop-down menu.) If this "feature" is added, I recommend it be disabled by default and be explicitly turned on in settings.json under "defaults".

aixfox commented 4 years ago

I expect the window to close when there is only one tab open and I close it (the last tab as I see it). I have no idea what would still show in the window if there are 0 tabs, perhaps a black empty space that supports no input other than opening a new tab via drop-down menu? This doesn't seem all that useful to me and actually a deterrent. I wouldn't close Terminal without good reason, such as a reboot or adding a WSL distro since we're still waiting for support on hot-loading distros that are added to the profile list (and appearing in the drop-down menu.) If this "feature" is added, I recommend it be disabled by default and be explicitly turned on in settings.json under "defaults".

Here is a user story: Close a tab -> Open other tabs. If the window is not opened always and the tab closed is the latest, user should do: Close a tab -> Find "Windows Terminal" application in OS -> Open default tab (default behavoir) -> Open other tabs -> Close unnecessary default tab.

It is confused.

Most browsers/editors/ternimal managers support this requirement, and their blank pages are helpful for what would be rendered in Windows Ternimal with 0 tabs.

WSLUser commented 4 years ago

Browsers are different. I haven't seen a terminal have this feature. Please state precedence (i.e. in VTE/xterm/Iterm2/etc. this works ).

aixfox commented 4 years ago

Browsers are different. I haven't seen a terminal have this feature. Please state precedence (i.e. in VTE/xterm/Iterm2/etc. this works ).

Managers of terminal, not terminal itself.

Here are some products: ConEmu/XShell/Terminus/MobaXterm.

zadjii-msft commented 4 years ago

Browsers are different. I haven't seen a terminal have this feature. Please state precedence (i.e. in VTE/xterm/Iterm2/etc. this works ).

I don't think there needs to be existing precedence for Terminal UI features like this. For something like VT sequence support, sure. However, I like this idea as a differentiating one.

Obviously this would be behind a setting, because most people probably just want the window to close when the last tab is closed, but giving the users the option for this functionality isn't a bad idea.

WSLUser commented 4 years ago

I actually do remember ConEmu having the feature. It was annoying for me and was glad when I could switch to Terminal. I'm glad this wouldn't be the default and instead an explicit setting.

aixfox commented 4 years ago

ok, just a setting feature request.

DHowett commented 4 years ago

This is definitely a duplicate of 4579 (if you read the comments), but this one has more info so I’m closing the other one.

ndac-todoroki commented 4 years ago

I use Konsole when I use Kubuntu, and Konsole has this feature (actually I'm using Yakuake, the quake-typed version of Konsole). Avoid closing window is great especially on quake mode, where the application should always be alive (so you can show/hide the terminal window by a global hotkey). Currently there is no quake mode on Windows Terminal, but there are some go-arounds using AutoHotkey, which I am using. The AH script doesn't work when Windows Terminal is closed.

Also, I usually just close the tab when I need to re-login on WSL2. Maybe this isn't the best way to do it?