Windows Terminal – installation et personnalisation

Introduction
Windows lance un nouveau terminal de saisie de commande qui va permettre de fusionner les shell classiques :
- cmd
- PowerSheel
- Windows Subsystem for Linux (WSL)
Ce nouvel outil est un concurrent direct à Terminal Cmder
Installation
- Lancer Windows Store

- Rechercher et installer Windows Terminal

Ajouter github bash

Modifier settings.json
{ "guid": "{00000000-0000-0000-ba54-000000000002}", "acrylicOpacity" : 1, "closeOnExit" : true, "colorScheme" : "Campbell", "commandline" : "\"%PROGRAMFILES%\git\usr\bin\bash.exe\" -i -l", "cursorColor" : "#FFFFFF", "cursorShape" : "bar", "fontFace" : "Consolas", "fontSize" : 12, "historySize" : 9001, "icon" : "C:\Program Files\Git\mingw64\share\git\git-for-windows.ico", "name" : "GitBash", "padding" : "0, 0, 0, 0", "snapOnInput" : true, "startingDirectory" : ".", "useAcrylic" : true }
Modifier le terminal par défaut
Modifier la propriété defaultProfile du fichier settings.json et lui attribuer le guid du shell par défaut
Modifier settings.json
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}"
}
Ajouter Windows terminal aux raccourcis disponibles sur le clique droit
Le dossier en cours
- Modifier settings.json
"startingDirectory" : ".
"
à la place de %USERPROFILE% pour chaque profil
Modifier la base de registre
- Créer le fichier wt.reg
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\wt] @="Open Windows Terminal here" [HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command] @="C:\Users\<User>\AppData\Local\Microsoft\WindowsApps\wt.exe"
- Attention mettre le nom du <User> correspondant à votre système
- Double cliquer sur le fichier et accepter la modification de base de registre de l’OS :


- la base de registre est mise à jour (saisir regedit)
Ajouter une image sur le clique droit
- Télécharger l’icone terminal.ico
- Créer le dossier WTerminal dans le dossier AppData
%USERPROFILE%/AppData/Local/
- Modifier la base de registre en saisissant la commande regedit
HKEY_CLASSES_ROOT\Directory\Background\shell\wt

- Pour le paramètre Icon ajouter
%USERPROFILE%/AppData/Local/WTerminal/terminal.ico
Clique droit opérationnel

Palette des commandes

Le terminal dispose d’un menu permettant d’accéder à des options comme :
- Fractionner le terminal en manière horizontale ou vertical
- Définir une couleur pour les onglets
- Rechercher
- Changer d’onglet
via le raccourci Ctrl + Shift + p
Pour activer ce menu, il faut ajouter dans le fichier settings.json
:
"keybindings":[ // ..... { "command": "commandPalette", "keys": "ctrl+shift+p" } ]
Ailleurs sur le web
- How to Add Open Windows Terminal Here Option to Right-click Menu
- Projet Windows Terminal disponible sur github
- Liste des options possibles : settings.json
- Microsoft publie Windows Terminal Preview 1.3 : palette de commandes