Created
March 23, 2015 21:09
-
-
Save oscarmcm/85478d7b71bc44eedb9e to your computer and use it in GitHub Desktop.
It's my custom therminal theme for oh-my-zsh
This file contains hidden or 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
# Clean, simple, compatible and meaningful. | |
# Terminal command status | |
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
# Terminal current folder | |
local current_folder="%{$fg[cyan]%}%c" | |
# Machine name. | |
function machine_name { | |
[ -f ~/.box-name ] && cat ~/.box-name || echo $HOST | |
} | |
# Git info | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%} %{$fg[yellow]%}✗%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%} ✔" | |
# Prompt format: ➜ USER at MACHINE in CURRENT_DIRECTORY on BRANCH STATE $ | |
PROMPT='${ret_status}%{$fg_bold[green]%}%p \ | |
%{$fg[cyan]%}%n \ | |
%{$fg[white]%}at \ | |
%{$fg[green]%}$(machine_name) \ | |
%{$fg[white]%}in \ | |
${current_folder} \ | |
%{$fg[white]%}on \ | |
%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} \ | |
%{$terminfo[bold]$fg[white]%}$ %{$reset_color%}' | |
if [[ "$USER" == "root" ]]; then | |
PROMPT=' | |
%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \ | |
%{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \ | |
%{$fg[white]%}at \ | |
%{$fg[green]%}$(machine_name) \ | |
%{$fg[white]%}in \ | |
${current_folder} \ | |
%{$fg[white]%}on \ | |
%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} \ | |
%{$terminfo[bold]$fg[white]%}$ %{$reset_color%}' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment