Created
February 9, 2015 14:19
-
-
Save nealrs/bfcca5589f4a59e46d45 to your computer and use it in GitHub Desktop.
my edits to the ys theme for oh-my-zsh
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
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background and the font Inconsolata. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# | |
# http://ysmood.org/wp/2013/03/my-ys-terminal-theme/ | |
# Mar 2013 ys | |
# Machine name. | |
function box_name { | |
[ -f ~/.box-name ] && cat ~/.box-name || hostname -s | |
} | |
# Directory info. | |
local current_dir='${PWD/#$HOME/~}' | |
# Git info. | |
local git_info='$(git_prompt_info)' | |
#ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}[" | |
ZSH_THEME_GIT_PROMPT_PREFIX=" · %{$fg[cyan]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$terminfo[bold]$fg[red]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$terminfo[bold]$fg[green]%}✓" | |
# Prompt format: \n DIRECTORY ·[BRANCH STATE] \n ❯ | |
# %{$terminfo[bold]$fg[blue]%}\ | |
# %{$fg[white]%}[%*] \ | |
PROMPT=" | |
%{$terminfo[bold]$fg[green]%}${current_dir}%{$reset_color%}\ | |
${git_info} | |
%{$terminfo[bold]$fg[magenta]%}❯ \ | |
%{$reset_color%}" | |
if [[ "$USER" == "root" ]]; then | |
PROMPT=" | |
%{$terminfo[bold]$fg[blue]%}root%{$reset_color%} \ | |
%{$terminfo[bold]$fg[green]%}${current_dir}%{$reset_color%}\ | |
${git_info} | |
%{$terminfo[bold]$fg[magenta]%}❯ \ | |
%{$reset_color%}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment