home |  electronics |  toolbox |  science club |  tuxtalk |  photos |  e-cards |  online-shop



May 2022

WSL with tabs

When I have to work with a windows PC 10 then I will always look for WSL. WSL is Microsoft's "windows subsystem for linux" aka Ubuntu shell. It makes Windows finally usable. The only problem is that the Microsoft terminal windows don't have any tabs. Your desktop becomes really messy if you have a few of those terminal windows with Ubuntu open. The solution is: Hyper (https://hyper.is/). It allows you to run multiple ubuntu bash shells in one application window and switch from shell to shell by clicking on the respective tab.

Hyper installation


Enjoy WSL with tabs.

hyper-pref.png
Edit the configuration and change the shell to bash.exe
hyper.png
This is what Hyper looks like, WSL with Tabs

Some WSL tips

Windows Terminal as an alternative to Hyper

Microsoft is offering as of Windows 10 "Windows Terminal" which is very configurable and has also tabs. It's part of the standard install in Windows 11 but you can manually install it in Windows 10. See https://aka.ms/terminal.

Windows Terminal does not have any context menu or button to access copy/paste functionality. You use the key combination crtl-shift-c and crtl-shift-v. A default Windows Terminal binds however also the key combinations crtl-c and crtl-v. This makes it somewhat unusable as a terminal because crtl-c is used in unix to interrupt a process (send signal SIGINT) and crtl-v is used in vim to mark a rectangular region. It's even a problem if you run powershell inside Windows Terminal because crtl-c is used there too. There is a way to fix this by changing the key binding in settings.

[windows terminal]
Windows terminal from microsoft is a usable alternative to Hyper.


Here is how to fix the keybinding in Windows Terminal such that crtl-c and crtl-v can be used by the shell running in the terminal. The key combination crtl-shift-c and crtl-shift-v will still work for copy/paste:

[]
Windows terminal default keybinding use crtl-c and crtl-v .

This is how to unbind crtl-c and crtl-v from Windows terminal:
[Windows terminal unbound crtl-c and crtl-v]
Windows terminal unbound crtl-c and crtl-v.

under actions add:
{ "command": null, "keys": "ctrl+c" },
{ "command": null, "keys": "ctrl+v" },

[newer versions of  Windows Terminal have a configuration gui]
newer versions of Windows Terminal have a configuration gui (no more need to edit the raw config file but you can still edit it with a text editor if you want)

You access the settings in the older versions and the newer versions of Windows Terminal under settings (in the old version it starts a text editor and you edit the config file).
[Access the settings of  Windows Terminal]
Access the settings of Windows Terminal

Another strange default setting of windows terminal is the cursor. It's so slim that you can not see it if you find something in a file (e.g. in less or vi). You can change it to a normal block:
[Windows Terminal change cursor]
Windows Terminal change cursor

Under profiles -> defaults you add this to get a proper cursor:
 "cursorShape": "filledBox"

Here is sample settings.json file if you want to see those setting in the right context.

Back to: "No preservatives added"



© 2004-2024 Guido Socher