all repos — dotfiles @ 9704419d6ace1b5b6f884d9b64a8f44c2c318909

my *nix dotfiles

zsh/prompt.nim (view raw)

 1import nicy, strformat
 2
 3let
 4  prompt = color("", "magenta")
 5  nl = "\n"
 6  gitBranch = color(gitBranch(), "yellow")
 7  cwd = color(tilde(getCwd()), "cyan")
 8  dirty = color("×", "red")
 9  clean = color("", "green")
10  g = gitBranch & gitStatus(dirty, clean)
11  git = italics(g)
12  venv = color(virtualenv(), "red")
13
14
15# the prompt
16echo fmt"{nl}{venv}{cwd}{git}{nl}{prompt}"