Katana Zsh

August 22, 2026 · View on GitHub

License: MIT Shell: Zsh Oh My Zsh Requires Nerd Font Git Integration Style: Powerline eza Compatible PRs Welcome

A minimalist, samurai-inspired prompt theme for Oh My Zsh. Katana Zsh renders the current directory and Git branch/status as two compact, dark steel-toned segments, joined by a Powerline-style separator, with a single crimson accent used for Git status.

Katana Zsh is a theme for Oh My Zsh, not a fork of it. It requires an existing Oh My Zsh installation and depends on Oh My Zsh's built-in Git integration; it does not implement its own Git parsing.

Preview

Katana Zsh prompt running in a terminal

Katana Zsh status bar close-up

The folder icon, directory path, a separator, and the Git branch with a status icon sit on two adjoining dark segments. The status icon turns green when the working tree is clean and red when it has uncommitted changes. The second line is a plain prompt character with nothing else on it.

The two segment backgrounds are close in tone by design (a restrained, low-contrast steel look) so they may be subtle depending on your monitor and terminal background. Actual appearance also depends on your terminal's color support and installed font; see Requirements below.

Features

  • Two-segment prompt: current directory, then Git branch and status, each on its own dark steel-toned background.
  • Git status shown as a single icon colored by state (clean or dirty) rather than a separate glyph and color pair, keeping the segment compact.
  • Directory and Git information both use Oh My Zsh's own APIs (%~ expansion and git_prompt_info/ZSH_THEME_GIT_PROMPT_*), so behavior such as hiding Git info outside a repository, and any Git plugin configuration already in your .zshrc, works exactly as it does with Oh My Zsh's bundled themes.
  • Git status stays asynchronous: the theme explicitly registers Oh My Zsh's async Git handler rather than blocking the prompt on git status for every keystroke.
  • All colors and both icon glyphs are overridable from .zshrc without editing the theme file; see Customization below.
  • An optional, separate file recolors eza (a modern ls replacement) output to match the same palette, for anyone who also uses eza.

Requirements

  • Zsh

  • Oh My Zsh, already installed, with the git plugin enabled in .zshrc (this is Oh My Zsh's default)

  • A terminal emulator with 24-bit (true color) support. Most modern terminals (iTerm2, Ghostty, WezTerm, Kitty, Windows Terminal, GNOME Terminal, Alacritty) support this already.

  • A Nerd Font, installed and selected as your terminal's font. The theme uses three Nerd Font glyphs: a folder icon (U+F115), a GitHub icon (U+F113), and a Powerline separator (U+E0B0). Without a Nerd Font, these render as empty boxes instead of icons.

    Any Nerd Font works, for example:

Installation

Quick install (new machine, nothing installed yet)

The following installs Zsh (if missing), Oh My Zsh, Katana Zsh, and eza, and makes Zsh your default shell, in one pass. Safe to run even if some of these are already installed. Review it before running, as with any install script:

# 1. Install Zsh if it isn't already present.
if ! command -v zsh >/dev/null 2>&1; then
  if command -v apt >/dev/null 2>&1; then sudo apt update && sudo apt install -y zsh
  elif command -v dnf >/dev/null 2>&1; then sudo dnf install -y zsh
  elif command -v pacman >/dev/null 2>&1; then sudo pacman -Sy --noconfirm zsh
  elif command -v brew >/dev/null 2>&1; then brew install zsh
  else
    echo "Could not detect a supported package manager. Install zsh manually, then re-run this script." >&2
    exit 1
  fi
fi

# 2. Install Oh My Zsh, unattended (does not change shell or launch zsh yet).
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended

# 3. Install Katana Zsh into Oh My Zsh's custom themes directory.
git clone https://github.com/KakshiDEV56/katana-zsh.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/katana-zsh"

# 4. Set it as the active theme.
sed -i.bak 's|^ZSH_THEME=.*|ZSH_THEME="katana-zsh/katana-zsh"|' ~/.zshrc

# 5. Optional: install eza for themed `ls` output (see "Optional: matching eza colors" below).
if ! command -v eza >/dev/null 2>&1; then
  if command -v apt >/dev/null 2>&1; then sudo apt install -y eza
  elif command -v dnf >/dev/null 2>&1; then sudo dnf install -y eza
  elif command -v pacman >/dev/null 2>&1; then sudo pacman -Sy --noconfirm eza
  elif command -v brew >/dev/null 2>&1; then brew install eza
  fi
fi

# 6. Make Zsh the default login shell.
chsh -s "$(command -v zsh)"

echo "Install complete. Close and reopen your terminal, or run: exec zsh"

A Nerd Font still has to be installed and selected in your terminal's preferences separately; this cannot be scripted the same way because font selection is a terminal-emulator setting, not a shell setting. See Requirements above for recommended fonts, and set one before reopening your terminal.

Manual installation (Zsh and Oh My Zsh already installed)

Clone this repository into Oh My Zsh's custom themes directory:

git clone https://github.com/KakshiDEV56/katana-zsh.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/katana-zsh"

Set the theme in .zshrc:

ZSH_THEME="katana-zsh/katana-zsh"

Reload your shell:

source ~/.zshrc

or open a new terminal window.

If icons appear as empty boxes, your terminal is not currently using a Nerd Font. Install one from the list above and set it as your terminal profile's font, then reload the terminal.

Customization

Every color and icon glyph can be overridden by setting the same variable in .zshrc, before the line that sources Oh My Zsh (source $ZSH/oh-my-zsh.sh):

# Example: swap the crimson status accent for a different color.
KATANA_ZSH_STATUS_DIRTY='#ff5555'

ZSH_THEME="katana-zsh/katana-zsh"
source $ZSH/oh-my-zsh.sh

Available variables:

VariableDefaultMeaning
KATANA_ZSH_DIR_BG#1f2335Directory segment background
KATANA_ZSH_DIR_FG#c0caf5Directory segment text
KATANA_ZSH_GIT_BG#24283bGit segment background
KATANA_ZSH_GIT_FG#7aa2f7Git segment text (branch name)
KATANA_ZSH_STATUS_CLEAN#2ea44fStatus icon color, clean working tree
KATANA_ZSH_STATUS_DIRTY#f7768eStatus icon color, dirty working tree
KATANA_ZSH_PROMPT_FG#7dcfffSecond-line prompt character color
KATANA_ZSH_PROMPT_CHARSecond-line prompt character
KATANA_ZSH_FOLDER_ICONU+F115Directory segment icon
KATANA_ZSH_GITHUB_ICONU+F113Git segment icon

Colors are 24-bit hex values, applied via Zsh's %F{#rrggbb}/%K{#rrggbb} prompt expansion.

Optional: matching eza colors

If you use eza in place of ls, eza-colors.zsh in this repository recolors its directory, executable, and symlink output to match the theme's palette. This is entirely separate from the Zsh theme itself; it only has an effect if eza is installed.

Source it from .zshrc, after Oh My Zsh is loaded:

source "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/katana-zsh/eza-colors.zsh"

This also defines ls, ll, la, and lt aliases for eza with icons and grouped directories enabled. If you already define these aliases elsewhere in .zshrc, source this file before your own alias definitions so yours take effect, or omit the aliases and just export EZA_COLORS yourself using the value in that file.

Note: eza's directory icon glyph itself is fixed by eza and is not configurable by this or any other file; only its color changes here.

Updating

cd "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/katana-zsh"
git pull

Then reload your shell.

Uninstalling

Remove the theme directory and change ZSH_THEME back to a different value in .zshrc:

rm -rf "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/katana-zsh"

License and acknowledgments

Katana Zsh is MIT licensed.

It is built for Oh My Zsh, adapting the segment-drawing approach from its bundled agnoster.zsh-theme and using Oh My Zsh's own Git integration throughout. Icons require a Nerd Font; the optional eza-colors.zsh targets eza. None of these are bundled — each is a separate dependency used through its own public interface.