Skip to content

Responsive ZSH theme featuring Git status information and a colored line above the prompt

License

Notifications You must be signed in to change notification settings

win8linux/headline

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Headline ZSH Theme

Screenshot_20240319_105537

Headline. A stylish theme with deliberate use of space. No dependencies. Customizable.


Features

Separator Line

A line above the prompt info text with matching colors. May be disabled with HEADLINE_LINE_MODE=off for a more compact prompt.

Information Line

<user> @ <host>: <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 the characters for joining segments and disable segments entirely.

Git Status

All the Git status symbols are customizable. The defaults are below:

Symbol Meaning
+ staged changes
! unstaged changes
? untracked files
commits behind
commits ahead
commits diverged
* stashed files
conflicts
(none) clean branch

Exit Code

→ <code> (<meaning>)

When enabled with HEADLINE_DO_ERR=true, print non-zero exit codes ahead of the prompt. The exit code meaning is merely a guess for the semi-standard exit codes (in the range 126-143) and is often incorrect.

Clock

When enabled with HEADLINE_DO_CLOCK=true, display the time to the right of the prompt.


Installation

Download the headline.zsh-theme file.

$ wget https://raw.githubusercontent.com/win8linux/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 70) 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. Play around with it and make it your own!

More details in Customization


Terminal Setup

For the continuous line above the prompt, no further setup is needed! Use any font you want, as long as it has the ▁ (Lower One-eighth Block) symbol.

If you want symbols, use a font that has them such as FiraCode Nerd Font and assign your desired symbols to the prefix variables.

More details in Terminal Setup


Screenshots

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

NOTE: A font with ligatures is no longer required for a continuous line.

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

Optional icons, special font needed.

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

Optionally show clock and exit code.

Screenshots of updated theme in Konsole using IBM Plex Mono and BlexMono for icons.

Screenshot_20240319_101937

Status showing + for staged changes, ! for unstaged changes, and for untracked files (configurable).

Screenshot_20240319_104232

Optional icons, special font needed (such as BlexMono here).


Related


Credits

About

Responsive ZSH theme featuring Git status information and a colored line above the prompt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%