Skip to content

Latest commit

 

History

History
102 lines (66 loc) · 4.08 KB

README.md

File metadata and controls

102 lines (66 loc) · 4.08 KB

Headline

A stylish Zsh theme with deliberate use of space. Single file. No dependencies. Highly customizable.


Features

Separator Line

The namesake of the prompt, a line above the information with matching colors. May be disabled with HL_SEP_MODE=off for a more compact prompt.

Information Line

<user> @ <host> (<venv>): <path> | <branch> [<status>]

This line collapses to fit within the terminal width. Individually style each segment of the information line using ANSI SGR codes (which are conveniently aliased in the theme file). You can customize nearly everything about the segments and even add your own.

Git Status

A segment with symbols describing the status of the current Git repository.

Symbol Meaning
+ Staged changes
! Unstaged changes
? Untracked files
Commits behind
Commits ahead
Commits diverged
* Stashed files
Conflicts
(none) Clean branch

Installation

Download the headline.zsh-theme file.

wget https://raw.githubusercontent.com/moarram/headline/main/headline.zsh-theme

In your ~/.zshrc, source the headline.zsh-theme file.

source your/path/to/headline.zsh-theme

More details in Installation


Customization

The headline.zsh-theme file describes variables (around line 80) for customizing prompt behavior, colors, styles, symbols, etc. You can edit the theme file directly or set these variables in your ~/.zshrc after sourcing the theme to override the defaults. There are plenty of options so play around and make it your own!

More details in Customization


Terminal Setup

For the continuous line above the prompt, use a font with ligatures such as Fira Code. Alternatively, use the "lower 1/8th block" character instead of underscores with HL_SEP[_LINE]='▁'.

If you want symbols, use a font that has them such as FiraCode Nerd Font and include your desired symbols in HL_CONTENT_TEMPLATE.

More details in Terminal Setup


Screenshots

Screenshots of theme in iTerm2. Using FiraCode Nerd Font for continuous line and fancy icons.

Status showing + for staged changes, ! for unstaged changes, and ? for untracked files.

Optional icons, special font required.

Path truncated to fit in available space, user and host hidden.

Options to show clock (HL_CLOCK_MODE=on), show exit code with meaning (HL_ERR_MODE=detail), and hide identical information (HL_INFO_MODE=auto).


Related


Credits