all repos — dotfiles @ c1bf4f2effbd7412bb0cd37d7e8586501f8663c1

my *nix dotfiles

Custom ZSH prompt using nicy

Signed-off-by: Anirudh <icyph0x@pm.me>
Anirudh icyph0x@pm.me
Wed, 28 Nov 2018 08:22:31 +0530
commit

c1bf4f2effbd7412bb0cd37d7e8586501f8663c1

parent

3f271c77dd2718a655dcf8404243909edee0c85c

3 files changed, 17 insertions(+), 1 deletions(-)

jump to
M .gitignore.gitignore

@@ -2,3 +2,4 @@ weechat/logs/*

weechat/weechat.log weechat/script/* bin/.oxo +zsh/prompt
M zsh/.zshrczsh/.zshrc

@@ -18,7 +18,7 @@ export PATH=$PATH:$HOME/.nimble/bin

# theme specefic _nicy_prompt() { - PROMPT=$("$HOME/.nimble/bin/nicy") + PROMPT=$("$HOME/Dotfiles/zsh/prompt") } precmd_functions+=_nicy_prompt _nicy_prompt
A zsh/prompt.nim

@@ -0,0 +1,15 @@

+import nicy, strformat + +let + prompt = color("› ", "magenta") + nl = "\n" + gitBranch = color(gitBranch(), "yellow") + cwd = color(tilde(getCwd()), "cyan") + dirty = color("×", "red") + clean = color("•", "green") + g = gitBranch & gitStatus(dirty, clean) + git = italics(g) + + +# the prompt +echo fmt"{nl}{virtualenv()}{cwd}{git}{nl}{prompt}"