windows Powershell customization without using Windows Subsystem for Linux(wsl)
Tags: powershell, custom, windows11
Published: 2022-02-26 08:43:35


 The Windows terminal provides a much improved command line experience in Windows . It’s packed with useful features like GPU acceleration, tabs, panes, themes, and shortcuts, along with full support for different environments such as PowerShell, Command Prompt, and Windows Subsystem for Linux. In this article, I’ll describe a few ways to tailor the terminal experience to your needs along with tips and tricks to make your experience much better.

Windows Subsystem for Linux (WSL), Mostly every one using this WSL for Terminal customization, but in this article i'll provide you another way for customizing your widows terminal with out using the WSL.
NOW i'll provide my powershell setup


Firstly go through the article before starting the process so that you have an idea what's going on , so that you can know what else you need to do




# MY  Powershell Setup! 👋

First download latest [windows terminal](https://www.microsoft.com/store/productId/9N0DX20HK701) and [Powershell](https://www.microsoft.com/store/productId/9MZ1SNWT0N5D
)  from microsoft store


Now open windows terminal  and now you have to open settings for that you need to click here on top of the windows terminal.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0z739i9dgejekoljrk98.png)
 
Now you will find settings button

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kf7vblz4kd1mfnao1g57.png)
 click on the settings option
here you need to change few options like

- Default profile to  powershell (you downloaded from microsoftstore)
- Default terminal appilication - windows terminal




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l86n86ro776u3l3bvs0f.png)
  


Now  under profiles you will find 
- Default click on it and now you need click on
- appearance : under appearance,you need to change Text colour scheme  to One half Dark.
 now you need to install the hack font under install font section you  will have instructions to install fonts Or choose your desired fonts


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/edmzx2un04jgakcwwv8x.png)
  now copy paste the settings in image.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mty6c13j7o6spyjh7c7g.png)
 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bb3ccb3es0fg0jml53hl.png)

here you can adjust the Acrylic opacity accourding to your need.
now you will find save option and  click to save the settings. 


## Pre-Requirments

- Hack (NerdFonts) - A Powerline patched font
- Scoop - A command-line installer
- Oh My Posh -prompt theme engine
- Terminal-Icons - file and folder icons
- psReadline - Cmdlets for customizing the editing environment, used for autocompletion
- Z -Directory jumper
- Fzf, PSFzf - Fuzzy finder


# Install font

 [Nerdfonts](https://github.com/ryanoasis/nerd-fonts/releases) -  My personal choice [hack font](https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Hack.zip)
Download  hack.zip and extract the zip file and install the fonts. consists like this(hack of Nerd Complete mono windows  compatable (opentype) open these files and click install, it will get installed in your windows.
 
- Now open your windows terminal and follow the commands  

# Install scoop to powershell
 - [scoop](https://scoop.sh/) - A command-line installer , type the following commands in powershell
 
 Open windows terminal and type the following commands to install 

scoop

```bash
 iwr -useb get.scoop.sh | iex

 scoop install curl sudo jq
 ```






# Install Git from powershell

 - [Git for windows](https://gitforwindows.org/) just type the following command in powershell.
```bash 
 winget install -e --id Git.Git
```
It will install git to windows




# Install neovim  to powershell
```bash
  scoop install neovim gcc
```


- Next  create a user profile 

- You  can do this in two methods




@@@@1 Simple method @@@@

1.Download [.config](https://github.com/yaswanthteja/.config) folder and move this folder  to ( C:\Users\your username\) 
- if you want to find user name just press windows+R or open run and type this 'netplwiz' then it will show  it will show your   username.
 (or)  
- In 'C drive' you will have users folder and in that you will find your usernamefolder(it will be your system name ) so paste these files over there.
Note:
in the .config folder there will be two files
 
# 1. user_profile.ps1
# 2. yeswa.omp.json 

- in the first file user_profile.ps1 you need to change this text which is shown in image to your username.omp.json 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8huboves7ya4dg8rb22.png)



- here you need to rename the  ' 2nd  file (yeswa.om.json) name 'to yourusername.omp.json.
   

(eg: yeswa.omp.json) here yeswa is my username, so replace or rename yeswa to your username.
if your username is Ben change to Ben.omp.json)

if you use the above method ,  now open windows terminal  you need to use the following command


```bash
 cd .config/powershell
```


And Continue this Process 

- If you uses the above 1st  method skip the 2nd method to avoid errors





-@@@@@@@@@@@ # 2 method @@@@@@@@@@@@@@@@
- ### 2.ManualProcess

##skip the following steps from here###
------------------------------------------------------------------------
```bash
 mkdir .config/powershell/user_profile.ps1
```
  - It will create a folder in 'Cdrive' as .config

   - And inside of it  will create a powershell folder 

   - And inside of it will create this file user_profile.ps1 
   now type this command
```bash
   nvim user_profile.ps1
```
to insert the text just press i button in keyboard  and paste the text

   Now u need to copy the text from github [user_profile.ps1](https://github.com/yaswanthteja/.config/blob/main/powershell/user_profile.ps1) and paste  the text  into the user_profile.ps1(the file you have created)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8huboves7ya4dg8rb22.png)
here you need to change the name  yeswa.omp.json to yourusername.omp.json

and to save the text press ESC  button  in keyboard and  press :wq  buttons and  hit enter button

if you face any error press ESC button and :q! buttons  and enterbutton  this will not save any text in the file
so you need  to follow the first method.

and next type the following command to create another file(

```bash
 mkdir .config/powershell/yourusername.omp.json
```
- here yourusername will be windows username followed by .omp.json


  In the same way you need to create another file(yourusername.omp.json) copy the text from [yeswa.omp.json](https://github.com/yaswanthteja/.config/blob/main/powershell/yeswa.omp.json) and paste the text into it yourusername.omp.json

### skip  upto here ### -------------------------------------------------------------------------------


Now type these in windows terminal


# Install oh My Posh to powershell

 - [Oh My Posh](https://ohmyposh.dev/) -Prompt theme engine
 For installing oh my posh  type the following commands in powershell
 ```bash
 Install -Module posh-git -Scope CurrentUser -Force  

 Install -Module oh-my-posh -Scope CurrentUser -Force
 ```
  # Install nvm  in power shell
 ```bash 
 scoop install nvm

 ```
 
 # Install Terminal Icons in powershell
- [Terminal Icons](https://github.com/devblackops/Terminal-Icons) - Folder and file icons
To install
 ```bash
 Install-Module -Name Terminal-Icons -Repository PSGallery -Force

Import-Module Terminal-Icons
```
# Install Z in powershell

- [Z](https://www.powershellgallery.com/packages/z/1.1.13)  - Directory jumper
```bash
Install-Module -Name z -Force

zdesk
```
# Install PSR ReadLine in powershell
[PSR ReadLine](https://docs.microsoft.com/en-us/powershell/module/psreadline/?view=powershell-7.2)  - Cmdlets for customizing the editing environment, used for autocompletion
```bash
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck

set-PSReadLineOption -PredictionSource History

set-PSReadLineOption -PredictionViewStyle ListView
```
# Install PSFzf in powershell

- [PSFzf](https://github.com/kelleyma49/PSFzf) - Fuzzy finder
```bash
Install-Module -Name PSFzf -Scope CurrentUser -Force

Set-PSFzfOption -PSReadLineChordProvider 'Ctrl+f' -PSReadLineChordReverseHistory 'Ctrl+r'
```

# you can set themes 

[Themes](https://ohmyposh.dev/docs/themes) ftom the themes youcan get any theme for free

```bash
Set-PoshPrompt -slim
```

here you can find a variety of themes that can use click on themes to get know more about themes
now you can set the themes  by this command 

set-PoshPrompt - theme name and hit enter

you succefully customized your terminal without using any wsl.

## Features

- Light/dark mode toggle
- Live previews
- Fullscreen mode
- Cross platform