Last active
November 12, 2016 22:22
-
-
Save lapwat/9217817940c293f8c748eb3bf584ed17 to your computer and use it in GitHub Desktop.
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
# PROMPT='%{$fg[magenta]%}[%~] %{$reset_color%}➜ ' | |
# | |
# # The right-hand prompt | |
# | |
# RPROMPT='%{$fg[red]%}${battery_command} %{$fg[yellow]%}%D{ %e %b} ${time}%{$reset_color%}' | |
# | |
# # Add this at the start of RPROMPT to include rvm info showing ruby-version@gemset-name | |
# # %{$fg[yellow]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%} | |
# | |
# # local time, color coded by last return code | |
# time_enabled="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}" | |
# time_disabled="%{$fg[green]%}%*%{$reset_color%}" | |
# time=$time_enabled | |
# battery_command=$(acpi | grep -o "[0-9]*%") | |
# battery="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}" | |
PROMPT=' | |
%{[7m%}%n: $fg[yellow]$(get_pwd) $(git_prompt_info) | |
$reset_color→ ' | |
RPROMPT='$(battery_charge) $(week_day) %{[01;38;5;214m%}%D{%e} ${time}%{$reset_color%}' | |
time="%(?.%{$fg_bold[white]%}.%{$fg_bold[red]%})%*%{$reset_color%}" | |
function get_pwd() { | |
echo "${PWD/$HOME/~}" | |
} | |
ZSH_THEME_GIT_PROMPT_PREFIX=" " | |
ZSH_THEME_GIT_PROMPT_SUFFIX="$reset_color" | |
ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]" | |
ZSH_THEME_GIT_PROMPT_CLEAN="$fg[green]" | |
function git_prompt_info() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
# echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
} | |
function battery_charge() { | |
if [ -e ~/bin/batcharge.py ] | |
then | |
echo `python ~/bin/batcharge.py`; | |
else | |
echo ''; | |
fi | |
} | |
function week_day() { | |
if [ -e ~/bin/batcharge.py ] | |
then | |
echo `python ~/bin/weekday.py`; | |
else | |
echo ''; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment