A minimal, fast prompt that blends the layout of the Refined theme with the vibrant color palette of AF-Magic.
- Structure: Based on Refined's
vcs_infologic, repo info line, exec-time display, and prompt glyph. - Colors: Adopted from AF-Magic (with a couple of custom tweaks).
- Extras: An adaptive underscore divider line above the prompt. Untracked files are counted as "dirty".
- A gray underscore bar spans the full terminal width.
- The next line shows repo/path info in cyan and blue, with a dirty mark when applicable.
- Command exec time (if > 5s) appears in orange.
- The prompt char is magenta, turning red on non-zero exit status.
- Adaptive divider: Full-width underscore line in gray.
- Repo info: Clean
vcs_infosummary with branch and state. - Dirty indicator:
*appended when the repo is dirty, including untracked files. - Exec time: Only shows when the last command took >5 seconds.
- SSH context: Right prompt shows
user@hostwhen connected via SSH.
These are ANSI 256 color indices used by the theme:
- Gray (divider, RPROMPT user@host):
FG[237] - Cyan (repo/path):
FG[032] - Light blue (VCS system and branch):
FG[075] - Orange (dirty mark and exec time):
FG[214] - Magenta (prompt carat):
FG[105] - Light pink (available for customization):
FG[218]
Note: Colors are provided by oh-my-zsh's color helpers ($FG, $fg, %{$reset_color%}) which are available to themes by default.
- Structure from Refined: Uses
vcs_info,preexec/precmd, and the❯prompt glyph; shows exec time when >5s. - Colors from AF-Magic: Applies AF-Magic-inspired colors to path, VCS, divider, and status markers.
- Divider line: Adds a full-width underscore line above the repo info.
- Dirty detection: Counts untracked files as “dirty” (via
git status --porcelain). - No Python env segment: Intentionally removed after experimentation in this repo.
I. Copy the theme file into your oh-my-zsh custom themes directory:
mkdir -p "$ZSH_CUSTOM/themes"
cp refined-magic.zsh-theme "$ZSH_CUSTOM/themes/"II. Set the theme in ~/.zshrc:
ZSH_THEME="refined-magic"III. Apply it:
source ~/.zshrcIf you keep this repository elsewhere, symlink instead of copy:
mkdir -p "$ZSH_CUSTOM/themes"
ln -s /absolute/path/to/refined-magic/refined-magic.zsh-theme "$ZSH_CUSTOM/themes/refined-magic.zsh-theme"In repo_information() adjust FG[075] to a different 256-color index (e.g., FG[081], FG[082], FG[087], FG[123]).
Replace local underscores=${(l:$COLUMNS::_:)} with a different character, e.g. - or ·.
In cmd_exec_time(), the 5 controls when the time appears.
- The theme uses
vcs_info(autoloaded by zsh) and standard Git commands for dirty checks. - Works best with a terminal that supports 256 colors and a font with the prompt glyph
❯.
- AF-Magic theme by Andy Fleming — oh-my-zsh wiki AF-Magic
- Refined theme (oh-my-zsh) — oh-my-zsh wiki Refined
- The refined theme itself credits Sindre Sorhus (Pure) and Julien Nicoulaud as inspirations.
- Remove the theme file and change your
ZSH_THEMEto a different theme:
rm -f "$ZSH_CUSTOM/themes/refined-magic.zsh-theme"
sed -i.bak 's/^ZSH_THEME=.*/ZSH_THEME="robbyrussell"/' ~/.zshrc
source ~/.zshrc