2

According to https://github.com/mintty/mintty/issues/944 since mintty 3.5.1 there should be a tab bar where you can open multiple tabs with terminals in parallel. For that reason I performed an installation of MSYS2 which includes mintty 3.5.1, as this seems to be the way how to use the mintty. (I verified this with invoking mintty with -V.)

However, I do not find no possibility for opening and/or managing tabs in the UI.

My requirement: I would very much like to have tabs for organizing terminals in parallel.

My question: What's going on here? Did I miss something? Do I need to execute the mintty/MSYS2 with some special commad line options? How can I enable tabs?

Regis May
  • 3,070
  • 2
  • 30
  • 51

2 Answers2

3

It was difficult for me to figure out how to turn this feature on. The answer is sprinkled through the comments of this issue, but not in one place. Therefore I'm posting this to save time for others. Here's how you turn the feature on:

Add --tabbar=4 or --tabbar to the windows shortcut that opens mintty:

image

The 4 is documented here:

  1. no geometry handling; terminal session windows are separate [default]
  2. sync. position/size when switching/launching/closing a session
  3. sync. also when window is moved or resized
  4. sync. also when window is minimized
  5. sync. also when window is started separately

If you'd like to create new tabs with ctrl-shift-t, close tabs with ctrl-shift-w, switch to previous tabs with ctrl-shift-tab, and switch to next tabs with ctrl-tab, add -o "KeyFunctions=t:new-window-cwd;w:close" as an option to that same line.

Personally, I'd like to have ctrl-t/w open and close tabs, respectively, but the only way I've figured how to do that is to add this option: -o CtrlExchangeShift=yes. The problem is, that changes all ctrl-shift commands to become ctrl commands. That means ctrl-r no longer searches bash history.

When you run the shortcut and create some tabs, mintty will look like this:

enter image description here

Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
2

You could use --tabbar option when staring minnty. see here for more information.

John Kexul
  • 23
  • 3
  • Doesn't work. I invoke "`mingw64.exe --tabbar`", I get a window for a quarter of a second and it closes immediately. A "`mingw64.exe --tabbar=1`" doesn't work either. – Regis May Nov 18 '21 at 21:39
  • Hi @RegisMay, I create a desktop shortcut of mintty and set the Target: `C:\cygwin64\bin\mintty.exe --tabbar` in its property window. Do you invoke minnty the same way? – John Kexul Nov 23 '21 at 04:13
  • Hi John, I've installed MSYS2 which provides `mintty` 3.5.1 as well. But now I've additionally installed Cygwin and follwed your recommendation. Thank you for that! – Regis May Dec 01 '21 at 11:07
  • 1
    However, it turns out that the "tabbar" implementation is quite useless. It seems that `mingw64` implements this by moving and resizing other windows. That means: There are still all the different windows with all the different icons in the windows taskbar, and the "tabbar" is nothing more than an overview about what other windows there are. No true "tabbing" such as having multiple views managed within a single window :-( – Regis May Dec 01 '21 at 11:10
  • 1
    @RegisMay For my needs, that's not useless (though i wish it worked the way you wanted). Maybe with the shortcuts mentioned in my answer will make the situation livable. – Daniel Kaplan Feb 01 '22 at 22:15