Custom ZSH prompt using nicy Signed-off-by: Anirudh <icyph0x@pm.me>
Anirudh icyph0x@pm.me
Wed, 28 Nov 2018 08:22:31 +0530
3 files changed,
17 insertions(+),
1 deletions(-)
M
.gitignore
→
.gitignore
@@ -2,3 +2,4 @@ weechat/logs/*
weechat/weechat.log weechat/script/* bin/.oxo +zsh/prompt
M
zsh/.zshrc
→
zsh/.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}"