Adds time to prompt
This commit is contained in:
parent
ee50dfd355
commit
509ed9956f
|
@ -83,11 +83,13 @@ local PR_TEMP=""
|
||||||
|
|
||||||
command -v vcgencmd > /dev/null && PR_TEMP=' ${PR_GREEN}‹$(vcgencmd measure_temp | cut -d = -f 2)›${PR_NO_COLOR}'
|
command -v vcgencmd > /dev/null && PR_TEMP=' ${PR_GREEN}‹$(vcgencmd measure_temp | cut -d = -f 2)›${PR_NO_COLOR}'
|
||||||
|
|
||||||
|
local PR_DATE='${PR_BOLD}${PR_MAGENTA}[%D{%H:%M:%S}]${PR_NO_COLOR}'
|
||||||
|
|
||||||
#PROMPT="${user_host} ${current_dir} ${rvm_ruby}${git_branch}$PR_PROMPT "
|
#PROMPT="${user_host} ${current_dir} ${rvm_ruby}${git_branch}$PR_PROMPT "
|
||||||
separator='${PR_YELLOW}::${PR_NO_COLOR}'
|
separator='${PR_YELLOW}::${PR_NO_COLOR}'
|
||||||
tty | read tty_value
|
tty | read tty_value
|
||||||
if [[ $tty_value == *pts* ]]; then # if in a tty
|
if [[ $tty_value == *pts* ]]; then # if in a tty
|
||||||
PROMPT="$PR_ARROW_UP${user_host}${separator}${PR_NO_COLOR}${current_dir} ${rvm_ruby}${git_branch}${PR_TEMP}
|
PROMPT="$PR_ARROW_UP${PR_DATE} ${user_host}${separator}${PR_NO_COLOR}${current_dir} ${rvm_ruby}${git_branch}${PR_TEMP}
|
||||||
$PR_ARROW_DOWN$PR_PROMPT ${PR_NO_COLOR}"
|
$PR_ARROW_DOWN$PR_PROMPT ${PR_NO_COLOR}"
|
||||||
return_code="%(?.%{$PR_GREEN%}%? ↵%{$PR_NO_COLOR%}.%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})"
|
return_code="%(?.%{$PR_GREEN%}%? ↵%{$PR_NO_COLOR%}.%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})"
|
||||||
else
|
else
|
||||||
|
@ -98,3 +100,8 @@ fi
|
||||||
RPS1=" ${return_code}"
|
RPS1=" ${return_code}"
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$PR_YELLOW%}‹"
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$PR_YELLOW%}‹"
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX="›%{$PR_NO_COLOR%}"
|
ZSH_THEME_GIT_PROMPT_SUFFIX="›%{$PR_NO_COLOR%}"
|
||||||
|
|
||||||
|
TMOUT=1
|
||||||
|
TRAPALRM() {
|
||||||
|
zle reset-prompt
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue