mintty / wsltty

Mintty as a terminal for Bash on Ubuntu on Windows / WSL
Other
3.12k stars 104 forks source link

Suggestion: Tabs for multiple terminals #295

Closed Kihltech closed 2 years ago

Kihltech commented 3 years ago

I would love to see "tabs" in a window for multiple terminals. I regularly have 8+ wsltty windows open and would like to be able to group the. And please, if you do this, do not remove the possibility to have multiple windows like some applications do.

Biswa96 commented 3 years ago

Tabbar is an experimental feature as of now. You can find more information in this manpage http://mintty.github.io/mintty.1.html

mintty commented 3 years ago

Tabbar support is available, and not experimental anymore. See the manual. Run mintty --tabbar to try.

yellowpattern commented 3 years ago

For each wsltty window, I should be able to choose to create another tab'd window. It shouldn't be a case where every new terminal is either a new tab or a new window.

In fact, launching a new instance of wsltty should create a new window. From each wsltty window there should be an menu option to create a new tab - and potentially tie that in to a shortcut keystroke of some description.

mintty commented 3 years ago

To support tabs, the instance must already be set up for it. Running mintty --tabbar however would integrate the new window as a new tab into an existing tab group. What you may want as I understand is an option like mintty --newtabgroup that would enable tabbar for the new window but apply a new "Class". This refers to a Windows concept that can be used to group windows. Is that how other applications handle tab instances?

yellowpattern commented 3 years ago

What I would like is to be able to create new windows and tabs like I can with web browsers. For example, with firefox I can double click on the desktop icon and get a new window. and I can go to a menu and get either a new tab or a new window.

I don't know how other applications handle tab instances.

Each time I double click on "wsltty" it should launch with "mintty --newtaggroup".

To create a new window under that tab bar it should either be a menu option or keyboard shortcut (or both.)

I would argue that is what the default behaviour should be because that is how other applications behave - launching with the icon creates a new window (well at least all web browsers function like that.)

mintty commented 2 years ago

I've completed a set of features. Testing appreciated.

yellowpattern commented 2 years ago

Is there a test version (release candidate) that's packaged up as a .exe/.cab that I can install?

mintty commented 2 years ago

You can copy the attached one in place of %LOCALAPPDATA%/mintty/bin/mintty.exe: mintty-new-tabs.zip

yellowpattern commented 2 years ago

I changed the icon on the desktop to start with "--tabbar". What happens is that each time I double-click the desktop icon, a new tab is created. If the "--tabbar" is not present then it isn't possible to create tabs.

I tried to start with "--newtabgroup" but that didn't work.

What was changed? What should I be testing?

mintty commented 2 years ago

Sorry, I should have added some docs, which aren't online yet before a release except in the repository. Especially you should set NewTabs=1 in the config file to enable automatic shortcut-dependent behaviour. Command line setting --newtabs will enforce a new tab group (maybe the name is not optimal?). Also, there are some user-definable functions for finer control which you could assign to function keys to your preference. For now, please see https://github.com/mintty/mintty/commit/21c7f97d8ac63e9fd3264ed51401ad88c76ea06e and https://github.com/mintty/mintty/commit/aa67c4dcc7f279799eb96c283eb9cb4db49c6402 for the changes.

mintty commented 2 years ago

Released 3.5.3.