Created
July 26, 2014 20:06
-
-
Save rajanand02/77eb2790d22d9540a482 to your computer and use it in GitHub Desktop.
custom zsh theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Machine name. | |
function box_name { | |
[ -f ~/.box-name ] && cat ~/.box-name || hostname | |
} | |
# Directory info. | |
local current_dir='${PWD/#$HOME/~}' | |
# Git info. | |
local git_info='$(git_prompt_info)' | |
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}%{$reset_color%}%{$fg[cyan]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✘" | |
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}cool ✔" | |
# Prompt format: \n # USER at MACHINE in DIRECTORY on git:BRANCH STATE [TIME] \n $ | |
PROMPT="╭─% | |
%{$fg[green]%}%n\ | |
%{$fg[cyan]%}@\ | |
%{$fg[green]%}$(box_name) \ | |
%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\ | |
${git_info} \ | |
%{$fg[green]%}[%*] | |
%{$terminfo[normal]$fg[white]%}╰─➤$P %{$reset_color%}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment