Customization Windows Terminal With Starship
- Mohammad Abu Mattar
- Windows , Terminal
- 21 Oct, 2022
- 05 Mins read
Introduction
In this article, we will learn how to install PowerShell and Starship, how to configure the Windows Terminal, and how to customize the Windows Terminal with Starship.
What Is a Windows Terminal?
Windows Terminal is a new, modern, fast, efficient, powerful, and productive terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and WSL. It includes many features that make it a great tool for developers and system administrators. It is a great replacement for the default Windows Command Prompt and PowerShell.
What Is a Starship?
Starship is a cross-shell prompt for any shell. It shows information about the current directory, the active branch, the status of the repository, and much more. It is highly customizable and can be extended with custom modules. It is written in Rust and is blazingly fast.
Installation
Install Windows Terminal
To install Windows Terminal, you can download it from the Microsoft Store or from the GitHub repository, or you can use the Chocolatey package manager or Winget package manager.
Install Windows Terminal From Microsoft Store
To install Windows Terminal from the Microsoft Store, you can follow the steps below:
- Open the Microsoft Store.
- Search for Windows Terminal.
- Click on the Get button.
Install Windows Terminal From GitHub
To install Windows Terminal from GitHub, you can follow the steps below:
- Open the GitHub repository.
- Click on the Releases tab.
- Click on the latest release.
- Click on the WindowsTerminal.exe file.
- Click on the Download button.
Install Windows Terminal With Chocolatey
To install Windows Terminal with Chocolatey, you can follow the steps below:
- Open the Chocolatey website.
- Click on the Packages.
- Search for Windows Terminal.
- Click on the command to install Windows Terminal.
- Run the command in CMD.
Install Windows Terminal With Winget
To install Windows Terminal with Winget, you can follow the steps below:
- Open the Winget website.
- Search for Windows Terminal.
- Click on the command to install Windows Terminal.
- Run the command in CMD.
Install PowerShell
To install PowerShell, you can download it from the Microsoft Store or from the GitHub repository, or you can use the Chocolatey package manager or Winget package manager.
Install PowerShell From Microsoft Store
To install PowerShell from the Microsoft Store, you can follow the steps below:
- Open the Microsoft Store.
- Search for PowerShell.
- Click on the Get button.
Install PowerShell From GitHub
To install PowerShell from GitHub, you can follow the steps below:
- Open the GitHub repository.
- Click on the Releases tab.
- Click on the latest release.
- Click on the PowerShell-7.2.0-win-x64.msi file.
- Click on the Download button.
Install PowerShell With Chocolatey
To install PowerShell with Chocolatey, you can follow the steps below:
- Open the Chocolatey website.
- Click on the Packages.
- Search for PowerShell.
- Click on the command to install PowerShell.
- Run the command in CMD.
Install PowerShell With Winget
To install PowerShell with Winget, you can follow the steps below:
- Open the Winget website.
- Search for PowerShell.
- Click on the command to install PowerShell.
- Run the command in CMD.
Install Starship
To install Starship, you can download it from the GitHub repository, or you can use the Chocolatey package manager or Winget package manager.
Install Starship From GitHub
To install Starship from GitHub, you can follow the steps below:
- Open the GitHub repository.
- Click on the Releases tab.
- Click on the latest release.
- Click on the starship-x86_64-pc-windows-msvc.zip file.
- Click on the Download button.
Install Starship With Chocolatey
To install Starship with Chocolatey, you can follow the steps below:
- Open the Chocolatey website.
- Click on the Packages.
- Search for Starship.
- Click on the command to install Starship.
- Run the command in CMD.
Install Starship With Winget
To install Starship with Winget, you can follow the steps below:
- Open the Winget website.
- Search for Starship.
- Click on the command to install Starship.
- Run the command in CMD.
Install Nerd Font
Quick install a nerd font from the Nerd Fonts website. You can choose any font you like. I will use the Caskaydia Cove Nerd Font
font.
Configuration
Configure Starship
To configure Starship, you can follow the steps below:
- Open the powershell.
- Run the command below to create the configuration file.
- Open the configuration file with your favorite text editor.
- Copy the configuration below and paste it in the configuration file. GitHub | starship.toml
Configure Starship on PowerShell
Every time a PowerShell instance launches, we’ll need to instance starship, to achieve this, we’ll need to add the following line to our PowerShell profile.
To create a PowerShell profile, and add the starship instance, you can follow the steps below:
- Open Windows Terminal.
- Run the following command to create a PowerShell profile.
- Run the following command to
Set-Content
cmdlet to add the line to the profile.
Note: You can check the location of this file by querying the
$PROFILE
variable in PowerShell. The path is often~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
.
Configure PowerShell on Windows Terminal
To configure PowerShell on Windows Terminal, you can follow the steps below:
- Open Windows Terminal.
- Click on
Ctrl + ,
to open the settings. - Click on
settings.json
to open the settings file. - Add the following lines to the
profiles
section.
- Change the
hidden
property totrue
for theWindows PowerShell
profile.
- Add
Dracula schemes
to theschemes
section.
- Save the file and close it.
- Back to Windows Terminal, click on
Ctrl + ,
to open the settings. - Go to Profiles >> Defaults >> Appearance >> Color scheme choose
Dracula
. - Go to Profiles >> Defaults >> Appearance >> Font face choose
Caskaydia Cove Nerd Font
.
Extra Configuration
- Open Windows Terminal.
- Run the command
- Run the following command to
Set-Content
cmdlet to add the line to the profile.