-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
|
||
get_pwd() { | ||
if [[ "$PWD" == "$HOME" ]]; then | ||
echo "~" | ||
else | ||
echo "$(basename $PWD)" | ||
fi | ||
} | ||
|
||
get_folder_level() { | ||
echo "$(expr $(grep -o '/' <<< "$PWD" | grep -c .) - 1)" | ||
} | ||
|
||
ssh_prompt_info() { | ||
if [[ -n "$SSH_CONNECTION" ]]; then | ||
echo "$fg[magenta]%n@%m » " | ||
fi | ||
} | ||
|
||
level_prompt_info() { | ||
echo "$fg_bold[cyan]$(get_folder_level)»$reset_color $(ssh_prompt_info)$fg[blue]$(get_pwd)" | ||
} | ||
|
||
git_prompt_info() { | ||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return 0 | ||
command git -c gc.auto=0 fetch &>/dev/null 2>&1 &| | ||
local index=$(command git status --porcelain -b 2> /dev/null) | ||
local git_status | ||
if $(echo "$index" | grep '^## .*ahead* .*behind' &> /dev/null); then | ||
git_status=" $ZSH_THEME_GIT_PROMPT_DIVERGED" | ||
elif $(echo "$index" | grep '^## .*ahead' &> /dev/null); then | ||
git_status=" $ZSH_THEME_GIT_PROMPT_AHEAD" | ||
elif $(echo "$index" | grep '^## .*behind' &> /dev/null); then | ||
git_status=" $ZSH_THEME_GIT_PROMPT_BEHIND" | ||
fi | ||
printf "$fg_bold[white]" | ||
printf "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)" | ||
printf "$ZSH_THEME_GIT_PROMPT_SUFFIX$git_status$reset_color" | ||
} | ||
|
||
docker_machine_prompt_info() { | ||
if [[ -n "$DOCKER_MACHINE_NAME" ]]; then | ||
echo "$fg[green] @$DOCKER_MACHINE_NAME" | ||
fi | ||
} | ||
|
||
virtualenv_indicator() { | ||
if [[ -z "$VIRTUAL_ENV" ]]; then | ||
psvar[1]="" | ||
psvar[2]="" | ||
else | ||
psvar[1]="${VIRTUAL_ENV##*/} " | ||
psvar[2]=" v$(python --version 2>&1 | sed -e "s/Python //")" | ||
fi | ||
} | ||
|
||
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | ||
|
||
ZSH_THEME_GIT_PROMPT_PREFIX=" " | ||
ZSH_THEME_GIT_PROMPT_SUFFIX="" | ||
ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]" | ||
ZSH_THEME_GIT_PROMPT_CLEAN="$fg[white]" | ||
ZSH_THEME_GIT_PROMPT_AHEAD="$fg[green]⇡" | ||
ZSH_THEME_GIT_PROMPT_BEHIND="$fg[magenta]⇣" | ||
ZSH_THEME_GIT_PROMPT_DIVERGED="$ZSH_THEME_GIT_PROMPT_AHEAD$ZSH_THEME_GIT_PROMPT_BEHIND" | ||
VIRTUAL_ENV_DISABLE_PROMPT="yes" | ||
|
||
add-zsh-hook precmd virtualenv_indicator | ||
|
||
PROMPT=' | ||
$(level_prompt_info)$(git_prompt_info)$fg[yellow]%2v$(docker_machine_prompt_info) | ||
$reset_color%1v${ret_status}$reset_color' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Terminator's profile config (colors and font used on the screenshot) | ||
|
||
background_color = "#282a36" | ||
background_image = None | ||
font = Fira Mono for Powerline Medium 10 | ||
foreground_color = "#eff0eb" | ||
palette = "#282a36:#ff5c57:#5af78e:#f3f99d:#57c7ff:#ff6ac1:#9aedfe:#f1f1f0:#686868:#ff5c57:#5af78e:#f3f99d:#57c7ff:#ff6ac1:#9aedfe:#eff0eb" | ||
use_system_font = False |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.