DEV Community

Cover image for windows Powershell customization without using Windows Subsystem for Linux(wsl)
yaswanthteja
yaswanthteja

Posted on • Updated on

windows Powershell customization without using Windows Subsystem for Linux(wsl)

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 and Powershell 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

Now you will find settings button

Image description
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

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
now copy paste the settings in image.

Image description

Image description

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 - My personal choice hack font
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 - A command-line installer , type the following commands in powershell

Open windows terminal and type the following commands to install

scoop

 iwr -useb get.scoop.sh | iex

 scoop install curl sudo jq
Enter fullscreen mode Exit fullscreen mode

Install Git from powershell

 winget install -e --id Git.Git
Enter fullscreen mode Exit fullscreen mode

It will install git to windows

Install neovim to powershell

  scoop install neovim gcc
Enter fullscreen mode Exit fullscreen mode
  • Next create a user profile

  • You can do this in two methods

@@@@1 Simple method @@@@

1.Download .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

  • 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

 cd .config/powershell
Enter fullscreen mode Exit fullscreen mode

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


 mkdir .config/powershell/user_profile.ps1
Enter fullscreen mode Exit fullscreen mode
  • 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
   nvim user_profile.ps1
Enter fullscreen mode Exit fullscreen mode

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 and paste the text into the user_profile.ps1(the file you have created)

Image description
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(

 mkdir .config/powershell/yourusername.omp.json
Enter fullscreen mode Exit fullscreen mode
  • 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 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 -Prompt theme engine For installing oh my posh type the following commands in powershell
 Install -Module posh-git -Scope CurrentUser -Force  

 Install -Module oh-my-posh -Scope CurrentUser -Force
Enter fullscreen mode Exit fullscreen mode

# Install nvm in power shell

 scoop install nvm

Enter fullscreen mode Exit fullscreen mode

# Install Terminal Icons in powershell

 Install-Module -Name Terminal-Icons -Repository PSGallery -Force

Import-Module Terminal-Icons
Enter fullscreen mode Exit fullscreen mode

Install Z in powershell

  • Z - Directory jumper
Install-Module -Name z -Force

zdesk
Enter fullscreen mode Exit fullscreen mode

Install PSR ReadLine in powershell

PSR ReadLine - Cmdlets for customizing the editing environment, used for autocompletion

Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck

set-PSReadLineOption -PredictionSource History

set-PSReadLineOption -PredictionViewStyle ListView
Enter fullscreen mode Exit fullscreen mode

Install PSFzf in powershell

Install-Module -Name PSFzf -Scope CurrentUser -Force

Set-PSFzfOption -PSReadLineChordProvider 'Ctrl+f' -PSReadLineChordReverseHistory 'Ctrl+r'
Enter fullscreen mode Exit fullscreen mode

you can set themes

Themes ftom the themes youcan get any theme for free

Set-PoshPrompt -slim
Enter fullscreen mode Exit fullscreen mode

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

Top comments (0)