8000 GitHub - billyto/geometry: geometry is a minimal, customizable zsh prompt theme
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

billyto/geometry

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

geometry

geometry is a minimal, customizable zsh prompt theme.

geometry

I started chopping away at Avit until I ended up with something minimal and inspired on Pure.

What it does:

  • display current git branch
  • display colored time since last commit (optional)
  • display state (clean/dirty) of the repo
  • display arrows indicating if you need to pull, push or if you are mid-rebase
  • set the terminal title to current command and directory
  • display the number of git conflicts and total conflicts (optional)
  • colorize the ▲ based on the current hostname (optional)
  • colorize the ▲ when running under root user (optional)
  • make you the coolest hacker in the whole Starbucks

Much like Pure, geometry adds a different marker if the last command result is different from 0. It also sets the title to [command @] directory. Check the title and marker here:

title_marker

Installing

antigen

Just add antigen bundle frmendes/geometry to your .zshrc.

oh-my-zsh

Move geometry.zsh to $HOME/.oh-my-zsh/custom/themes/geometry.zsh-theme and set ZSH_THEME="geometry" in your .zshrc.

zplug

Add zplug "frmendes/geometry" to your .zshrc

Dependencies

The symbol for rebasing comes from a Powerline patched font. If you want to use it, you're going to need to install one from the font repo. The one used in the screenshots is Roboto Mono. You can also try to patch it yourself.

Alternatively, change the symbol by setting the GEOMETRY_SYMBOL_GIT_REBASE variable. See options

Options

geometry has plenty of customization options available. Just set the variables in the beginning of the geometry.zsh file to whatever you like! You can also set the custom options in your .zshrc before loading the prompt. See my dotfiles where I set the options for geometry before loading antibody.

git conflicts

You can optionally have the prompt display both the number of files with conflicts as well as the total number of conflicts by setting the PROMPT_GEOMETRY_GIT_CONFLICTS variable to true.

This option uses grep and ag with the latter being a much faster alternative.

If you don't have ag installed, this might slow your prompt down.

git time since last commit

You can optionally hide the time since last commit by setting the PROMPT_GEOMETRY_GIT_TIME variable to false. You might want to do this if the prompt is too slow on large repositories.

colorized symbol ▲

You can optionally have the ▲ (or whatever GEOMETRY_PROMPT_SYMBOL you set) change colors based on a simple hash of your hostname by setting the PROMPT_GEOMETRY_COLORIZE_SYMBOL variable to true.

colorized_symbol

colorize root

You can have your prompt symbol change colors when running under the root user.

To activate this option, just set PROMPT_GEOMETRY_COLORIZE_ROOT to true. Symbol and color can be customized by changing the GEOMETRY_SYMBOL_ROOT and GEOMETRY_COLOR_ROOT variables.

Note that this option overrides the color hashing of your prompt symbol.

About

geometry is a minimal, customizable zsh prompt theme

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%
0