Featured image of post shell621

shell621

e621 theme for Powershell


This guide will show you how I gave my Powershell and prompt an e621 theme. It is based on the Oh My Posh prompt theme engine and Chris Titus’ Ultimate Powershell Experience. The shell621 prompt theme is my own modification of the OMP free-ukraine theme.

Oh My Posh is cross-platform, so it is possible to adapt the below guide to macOS and Linux shells (without the use of winget and the profile setup script).

  • Prerequisite: make sure winget is installed. Execute the following command in an elevated PowerShell window to install winget:
irm asheroto.com/winget | iex
  1. Execute the following command in an elevated PowerShell window to install the PowerShell profile:
irm "https://vhs.dog/shell621/setup.ps1" | iex

This script will handle installing all the neccesary components (Oh my Posh and nerd fonts) and generate a new shell profile script.

  • Open up a new Powershell window. It may look a little broken like this:

Shell prompt with broken font

  1. Let’s setup the shell colors first. Open Settings by pressing Ctrl+,. Go to Color schemes in the left pane menu. Click on Open JSON file at the bottom-left of the window.

The color schemes settings page

  • Find the "schemes" section. Add the following color definitions after the last } before "themes".
,
        {
            "background": "#152F56",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#B4C7D9",
            "brightGreen": "#2BFF2B",
            "brightPurple": "#DD00DD",
            "brightRed": "#F6B295",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#FBD67F",
            "cursorColor": "#FFFFFF",
            "cyan": "#2E76B4",
            "foreground": "#B4C7D9",
            "green": "#00AA00",
            "name": "shell621",
            "purple": "#FF5EFF",
            "red": "#ED5D1F",
            "selectionBackground": "#FFFFCC",
            "white": "#CCCCCC",
            "yellow": "#F2AC08"
        }
  • It should look like this:

The shell color codes inserted into settings.json

  • Save and close settings.json You can now select the shell621 color scheme.

The shell621 color scheme listed under Color schemes

  • Click on it, click on Set as default and click Save

  1. Let’s fix the broken font next. In the menu on the left, under the profiles section, click on Defaults (or just the shell you’re using). In the menu on the right, under Additional settings, click on Appearance. In the Font face dropdown menu, select either of the CaskaydiaCove Nerd Fonts.

Selecting the correct font

  • Next we’ll set the background image. Save the following image anywhere on your drive.

hexgrid.png

Alt+click to save

  • Scroll down to the Background image section, expand Background image path and browse for hexgrid.png

Selecting hexgrid.png as the shell background image

  • Click Save. (You can also set window transparency on this page if you want.)

  • You can now close the Settings menu and the color scheme and font should be active. The theme is all setup!

Optional: The profile script is initally setup to load the prompt theme from the Internet. If you’d prefer to load it offline, execute the following command in your shell window:

$PROFILE

This will display the location of your shell profile script. Download the following JSON file and save it in the same directory as your shell profile as output by the $PROFILE variable.

shell621.json

Alt+click to save

  • Open the Microsoft.PowerShell_profile.ps1 file displayed by the $PROFILE variable.

  • At the end of the file, under the ## Final Line to set prompt section, replace https://vhs.dog/shell621/shell621.json with the full local path of the shell621.json file, in apostrophes.

Setting the path of the OMP theme file.

All done! If you want to display system info with OS ASCII art, install neofetch with winget:

winget install neofetch

All done!