My favourite modern prompt theme - works across multiple shells with a beautiful color palette.
This theme uses a beautiful, harmonious palette:
- Charcoal:
#264653 - Persian Green:
#2a9d8f - Saffron:
#e9c46a - Sandy Brown:
#f4a261 - Burnt Sienna:
#e76f51 - Dark Teal:
#1e756a - Slate Blue:
#536878
The easiest way to install this theme is using the provided installation scripts.
-
Download this repository, open Terminal in the repository directory, and run:
./install.sh
-
The script will:
- Check and install Homebrew (macOS) or required packages (Linux)
- Install Oh My Posh if not already installed
- Install Hack Nerd Font if not already installed
- Configure your shell (.zshrc or .bashrc) automatically
- Apply the theme to your current session
-
Download this repository, open PowerShell (ideally as Administrator), navigate to the repository directory, and run:
# You may need to allow script execution first Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process # Run the installer .\install.ps1
-
The script will:
- Install Winget if not present (may require interaction)
- Install Windows Terminal if not present
- Install Git if not present
- Install Oh My Posh if not present
- Install Hack Nerd Font
- Configure PowerShell, Command Prompt, and Git Bash automatically
- Apply the theme to your current session
This repository includes the Hack Nerd Font family in the fonts directory to ensure you can install the theme even in environments with limited internet access or when facing issues with font downloads.
The installation scripts will:
- First try to install Hack Nerd Font using standard methods (Homebrew, Oh My Posh's font installer)
- If those methods fail (e.g., network issues, proxy problems), the scripts will automatically fall back to installing the bundled fonts
The bundled fonts include:
- Hack Regular Nerd Font Complete
- Hack Bold Nerd Font Complete
- Hack Italic Nerd Font Complete
- Hack Bold Italic Nerd Font Complete
For detailed font installation troubleshooting, see Font Installation Guide.
If you prefer to install manually or encounter issues with the one-click installers, follow the detailed guide below for your specific environment.
-
Install Homebrew (If not already installed):
Open Terminal (press
Cmd+Space, type "Terminal", and press Enter) and run:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Follow the prompts to complete installation.
After installation, make sure Homebrew is in your PATH by following the instructions shown at the end of the installation output, which typically involves running these two commands:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
-
Install Git (If not already installed):
brew install git
-
Install Oh My Posh:
brew install oh-my-posh
-
Verify installation:
oh-my-posh --version
You should see a version number displayed if the installation was successful.
Nerd Fonts are essential for displaying the icons in the theme.
-
Install a Nerd Font (Hack is recommended):
brew tap homebrew/cask-fonts brew install --cask font-hack-nerd-font
If you encounter issues with the Homebrew installation, you can manually install the bundled Nerd Fonts:
# Navigate to the fonts directory in the repository cd path/to/repository/fonts # Copy the fonts to your user fonts directory mkdir -p ~/Library/Fonts cp *.ttf ~/Library/Fonts/
-
Configure Terminal to use the Nerd Font:
For Terminal.app:
- Open Terminal
- Go to Terminal > Settings... (or press
Cmd+,) - Select the "Profiles" tab
- Select your profile on the left
- Click the "Font" button
- Find and select "Hack Nerd Font" from the list
- Click "OK" to save your changes
For iTerm2 (recommended - if not installed, run
brew install --cask iterm2):- Open iTerm2
- Go to iTerm2 > Settings... (or press
Cmd+,) - Go to Profiles > Text
- Click on "Font" and change it to "Hack Nerd Font"
- Click "OK" to save your changes
For VS Code:
- Open VS Code
- Press
Cmd+,to open Settings - Search for "terminal font family"
- In "Terminal > Integrated: Font Family", type
'Hack Nerd Font' - Restart VS Code to apply changes
-
Clone the repository:
# Navigate to your home directory cd ~ # Create a folder for the theme (if you want to keep it organized) mkdir -p .oh-my-posh-themes # Navigate to that folder cd .oh-my-posh-themes # Clone the repository git clone https://github.com/kartikshankar/kartikshankar-ohmyposh-theme.git # Navigate into the repository cd kartikshankar-ohmyposh-theme
-
Get the full path to the theme file (we'll need this for the next step):
echo "$(pwd)/kartikshankar.omp.json"
Copy the output of this command as you'll need it in the next step.
Choose the instructions for your shell:
For Zsh (Default shell on macOS since Catalina):
-
Edit your
~/.zshrcfile:nano ~/.zshrc -
Add the following line at the end of the file (replace the path with the one you copied in the previous step):
eval "$(oh-my-posh init zsh --config ~/path/to/kartikshankar.omp.json)"
-
Save and exit by pressing
Ctrl+O, thenEnter, thenCtrl+X. -
Apply the changes:
source ~/.zshrc
For Bash:
-
Edit your
~/.bash_profilefile:nano ~/.bash_profile -
Add the following line at the end of the file (replace the path with the one you copied previously):
eval "$(oh-my-posh init bash --config ~/path/to/kartikshankar.omp.json)"
-
Save and exit by pressing
Ctrl+O, thenEnter, thenCtrl+X. -
Apply the changes:
source ~/.bash_profile
For Git Bash on macOS:
-
Edit your
~/.bashrcfile (create if it doesn't exist):touch ~/.bashrc # Create if it doesn't exist nano ~/.bashrc
-
Add the following line at the end of the file (replace the path with the correct one):
eval "$(oh-my-posh init bash --config ~/path/to/kartikshankar.omp.json)"
-
Save and exit by pressing
Ctrl+O, thenEnter, thenCtrl+X. -
Apply the changes:
source ~/.bashrc
For PowerShell on macOS:
-
First, ensure PowerShell is installed:
brew install --cask powershell
-
Open PowerShell:
pwsh
-
Create a PowerShell profile if it doesn't exist:
if (!(Test-Path -Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force }
-
Edit your PowerShell profile:
nano $PROFILE -
Add the following line to the profile (replace the path with your actual theme path):
oh-my-posh init pwsh --config '~/path/to/kartikshankar.omp.json' | Invoke-Expression
-
Save and exit by pressing
Ctrl+O, thenEnter, thenCtrl+X. -
Apply the changes:
. $PROFILE
-
Open a new terminal window or tab to see your new theme in action.
-
If the prompt doesn't look right, check these common issues:
- Make sure the Nerd Font is correctly set in your terminal
- Try running
oh-my-posh debugto check if Oh My Posh is working correctly - Verify the path to the theme file is correct
-
Install Windows Terminal (Recommended for best experience):
- Open Microsoft Store
- Search for "Windows Terminal"
- Click "Get" or "Install"
Alternatively, you can download it from the Microsoft website.
-
Install PowerShell 7 (Recommended, but PowerShell 5.1 also works):
- Open Microsoft Store
- Search for "PowerShell"
- Select "PowerShell" (not "PowerShell Preview")
- Click "Get" or "Install"
Alternatively, you can download it from the PowerShell GitHub.
-
Install Git (if not already installed):
- Download from git-scm.com
- Run the installer, using default options is fine
-
Open PowerShell (Windows Terminal with PowerShell 7 is recommended).
-
Install Oh My Posh using winget:
winget install JanDeDobbeleer.OhMyPosh
If winget is not available, you can use the installer script:
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-WebRequest -useb get.scoop.sh | Invoke-Expression scoop install oh-my-posh
-
Restart your PowerShell/terminal after installation.
-
Verify installation:
oh-my-posh --version
-
Install a Nerd Font using Oh My Posh:
oh-my-posh font install
This will open a menu. Choose "Hack" (recommended) or any other Nerd Font you prefer by typing its number and pressing Enter.
If you encounter network issues or the above command fails, you can use the bundled fonts:
# Navigate to the fonts directory in the repository cd path\to\repository\fonts # Install the fonts by right-clicking and selecting "Install" # Or you can use the following to open the folder and install them manually explorer.exe .
-
Configure Windows Terminal to use the Nerd Font:
- Open Windows Terminal
- Click the dropdown arrow and select "Settings" (or press
Ctrl+,) - Click on your profile (e.g., "PowerShell", "Command Prompt")
- Scroll down to "Appearance"
- Change "Font face" to "Hack Nerd Font" (or whichever font you installed)
- Click "Save"
- Restart Windows Terminal
For VS Code:
- Open VS Code
- Press
Ctrl+,to open Settings - Search for "terminal font family"
- In "Terminal > Integrated: Font Family", type
'Hack Nerd Font' - Restart VS Code to apply changes
-
Create a folder for the theme:
# Navigate to your Documents folder cd ~\Documents # Create a folder for the theme mkdir oh-my-posh-themes # Navigate to that folder cd oh-my-posh-themes
-
Clone the repository:
git clone https://github.com/kartikshankar/kartikshankar-ohmyposh-theme.git # Navigate into the repository cd kartikshankar-ohmyposh-theme
-
Get the full path to the theme file:
(Get-Item .\kartikshankar.omp.json).FullNameCopy the output of this command as you'll need it in the next step.
For PowerShell 7 or PowerShell 5.1:
-
Check if a PowerShell profile exists:
Test-Path $PROFILE
If this returns
False, create the profile:New-Item -Path $PROFILE -Type File -Force
-
Edit your PowerShell profile:
notepad $PROFILEIf Notepad doesn't open your profile, try using VS Code or another text editor:
code $PROFILE # If VS Code is installed
-
Add the following line to your profile (replace the path with the one you copied in the previous step):
oh-my-posh init pwsh --config "C:\Users\YourUsername\Documents\oh-my-posh-themes\kartikshankar-ohmyposh-theme\kartikshankar.omp.json" | Invoke-Expression
-
Save and close the file.
-
Apply the changes:
. $PROFILE
For Command Prompt:
-
Create a Lua script for Command Prompt:
$luaScript = @" load(io.popen('oh-my-posh init cmd --config "C:/Users/YourUsername/Documents/oh-my-posh-themes/kartikshankar-ohmyposh-theme/kartikshankar.omp.json"'):read("*a"))() "@ # Replace the path with your actual path $luaScript = $luaScript -replace "C:/Users/YourUsername", $env:USERPROFILE.Replace('\', '/') # Save the script $luaScript | Out-File -FilePath "$env:USERPROFILE\oh-my-posh.lua" -Encoding utf8
-
Set up Command Prompt to use the script:
- Open Registry Editor (
regedit) - Navigate to
HKEY_CURRENT_USER\Software\Microsoft\Command Processor - Right-click > New > String Value
- Name:
AutoRun - Value:
%USERPROFILE%\oh-my-posh.lua
- Open Registry Editor (
-
Restart Command Prompt to see the changes.
For Git Bash on Windows:
-
Edit your Git Bash profile:
notepad ~/.bashrcIf the file doesn't exist, it will be created.
-
Add the following line to the profile (replace the path with your actual theme path, and use forward slashes):
eval "$(oh-my-posh init bash --config '/c/Users/YourUsername/Documents/oh-my-posh-themes/kartikshankar-ohmyposh-theme/kartikshankar.omp.json')"
-
Save and close the file.
-
Apply the changes by restarting Git Bash or running:
source ~/.bashrc
-
Start a new instance of your shell (PowerShell, Command Prompt, or Git Bash).
-
Check if the theme is displayed correctly.
-
If you see boxes or missing icons:
- Make sure the Nerd Font is correctly set in your terminal
- Try a different Nerd Font:
oh-my-posh font installand choose another font - Use the bundled Nerd Fonts in the repository's
fontsdirectory
-
Icons not displaying correctly:
- Verify you're using a Nerd Font
- Try running:
oh-my-posh font installand choose a different font - Use the bundled Nerd Fonts in the repository's
fontsdirectory
-
Error when running the init command:
- Make sure the path to the theme file is correct
- If using PowerShell, ensure execution policy allows scripts:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
Path issues:
- Ensure you're using the correct path format:
- PowerShell:
C:\Users\Username\path\to\theme.jsonor$env:USERPROFILE\path\to\theme.json - Command Prompt (in Lua script):
C:/Users/Username/path/to/theme.json(note the forward slashes) - Git Bash:
/c/Users/Username/path/to/theme.json(Git Bash style paths)
- PowerShell:
- Ensure you're using the correct path format:
-
Font download issues:
- If you encounter the "failed to get nerd fonts release" error or other download issues, use the bundled fonts provided in the repository's
fontsdirectory
- If you encounter the "failed to get nerd fonts release" error or other download issues, use the bundled fonts provided in the repository's
Feel free to customize this theme to your liking by modifying the JSON configuration file. For detailed documentation on all available options, refer to the Oh My Posh documentation.
If you're using VS Code's integrated terminal, follow these additional steps:
- Open VS Code settings (Cmd+,)
- Search for "terminal font family"
- Set "Terminal > Integrated: Font Family" to
'Hack Nerd Font'(including the quotes) - Restart VS Code
- Open VS Code settings (Ctrl+,)
- Search for "terminal font family"
- Set "Terminal > Integrated: Font Family" to
'Hack Nerd Font'(including the quotes) - Restart VS Code
- Edit your
alacritty.ymlfile - Under the
fontsection, set:font: normal: family: "Hack Nerd Font"
- Edit
.hyper.jsin your home directory - Find the
fontFamilysetting and change to:fontFamily: '"Hack Nerd Font", monospace',
Symptom: Boxes or question marks instead of icons
Solution:
- Verify you've installed a Nerd Font (
brew list | grep fonton macOS oroh-my-posh font liston Windows) - Make sure your terminal is configured to use the Nerd Font
- Try a different Nerd Font if issues persist
- Use the bundled Nerd Fonts in the repository's
fontsdirectory
Symptom: "Failed to get nerd fonts release" error when trying to download fonts
Solution:
- You might have network connectivity issues or proxy restrictions
- Use the bundled fonts in the repository's
fontsdirectory - For Windows, navigate to the
fontsfolder and manually install the fonts - For macOS/Linux, copy the font files to your user's font directory
Symptom: Oh My Posh not finding theme file
Solution:
- Use the absolute path to the theme file
- On Windows, make sure to use the correct path format (backslashes typically, forward slashes in Lua script)
- Verify the file exists at the specified location
Symptom: Terminal is slow to start
Solution:
- Run
oh-my-posh debugto identify potential issues - Consider simplifying the theme by removing segments you don't need
This theme has been thoroughly tested to ensure it works correctly across different platforms and terminals. Test results and additional documentation can be found in the test_results directory:
- Latest Test Summary - Overall test results and recent improvements
- Font Installation Guide - Detailed guide for troubleshooting font issues
- Test Run Output - Raw output from the latest test run
To run the tests yourself:
./run-all-tests.shIf you encounter issues with this theme:
- Check the official Oh My Posh documentation
- Visit the Oh My Posh GitHub repository
- Join the Oh My Posh Discord community
- Check our Font Installation Guide for font-specific issues
MIT
Contributions are welcome! Feel free to open an issue or submit a pull request.







