Windows Terminal Install and Beautify

introduce Windows Teminal is a new, fast, eff...
introduce
Install Windows Terminal
Beautify Windows Terminal

introduce

Windows Teminal is a new, fast, efficient and powerful terminal application for Shell users such as command line tools, command prompts, PowerShell, WSL(Linux subsystem), etc. Its main functions include multi-tabs, panes, Unicode/UTF-8 character support, GPU accelerated text rendering engine, and custom themes, styles and configurations.

Github address: https://github.com/microsoft/terminal

Official download address: https://www.microsoft.com/zh-cn/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab

Install Windows Terminal

Open Microsoft Store, search for Windows Teminal, and install it.

Start:

Install the latest version of PowerShell

Widows 10 defaults to Windows PowerShell version 5.X. When you open PowerShell after Win10 V1903 or above, you will be prompted to "try a new cross-platform PowerShell" https://aka.ms/pscore6" To open the prompt web address.

Download address: https://github.com/PowerShell/PowerShell/releases

Select the installation package in PowerShell-<version>-win-<os-arch>.msi format:

After downloading, double-click the installer and follow the instructions.

Setup creates a shortcut in the Windows Start menu.

  • By default, the package installation location is $env:ProgramFiles\PowerShell\
  • You can use the Start menu or $Env:ProgramFiles\PowerShell\Pwsh.exeStart PowerShell

PowerShell 7 is installed in the new directory and runs in parallel with Windows PowerShell 5.1.For PowerShell Core 6.x, PowerShell 7 is an in-place upgrade that removes PowerShell Core 6.x.

  • PowerShell 7 is installed to $env:ProgramFiles\PowerShell
  • $env:ProgramFiles\PowerShell folder added to $env:PATH
  • $env:ProgramFiles\PowerShell Folder Deleted

If you need to run PowerShell 6 in parallel with PowerShell 7, use ZIP Installation Method Reinstall PowerShell 6.

View versions and enter commands in command line windows

$PSVersionTable.PSVersion

Beautify Windows Terminal

Reference resources: https://docs.microsoft.com/zh-cn/windows/terminal/

The default session is Power Shell version 5.x, modified to 7

"defaultProfile": Change the value to "source": "Windows.Terminal.PowershellCore"A guid is fine, for example if its guid is"".

"defaultProfile": "",

schemes configuration

{ "name": "Snazzy", "black": "#000000", "red": "#fc4346", "green": "#50fb7c", "yellow": "#f0fb8c", "blue": "#49baff", "purple": "#fc4cb4", "cyan": "#8be9fe", "white": "#ededec", "brightBlack": "#555555", "brightRed": "#fc4346", "brightGreen": "#50fb7c", "brightYellow": "#f0fb8c", "brightBlue": "#49baff", "brightPurple": "#fc4cb4", "brightCyan": "#8be9fe", "brightWhite": "#ededec", "background": "#1e1f29", "foreground": "#ebece6" }

Install oh-my-posh

Github address: https://github.com/JanDeDobbeleer/oh-my-posh

Install posh-git and oh-my-posh

Install-Module posh-git -Scope CurrentUser Install-Module oh-my-posh -Scope CurrentUser Install-Module DirColors

Setting Powershell's profile

if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force } notepad $PROFILE

Paste the following into the profile file

Import-Module posh-git Import-Module oh-my-posh Import-Module DirColors

Theme Color Beautification

Install colortool

scoop install colortool

View color scheme

colortool -s

Set color:

colortool OneHalfDark.itermcolors

Power Shell 7 Beautification

Configuration for Power Shell 7:

{ "guid": "", "hidden": false, "name": "PowerShell", "source": "Windows.Terminal.PowershellCore", "colorScheme" : "Snazzy", "startingDirectory": "E:\\

22 May 2020, 12:52 | Views: 10050

Add new comment

For adding a comment, please log in
or create account

0 comments