Merge pull request #545 from goromlagche/add-time-to-bobby
adding datetime and battery percentage to theme 'bobby'pull/556/head
commit
2cac4380b9
|
|
@ -13,6 +13,10 @@ SCM_THEME_TAG_PREFIX='tag:'
|
||||||
SCM_THEME_COMMIT_PREFIX='commit:'
|
SCM_THEME_COMMIT_PREFIX='commit:'
|
||||||
SCM_THEME_REMOTE_PREFIX=''
|
SCM_THEME_REMOTE_PREFIX=''
|
||||||
|
|
||||||
|
CLOCK_CHAR='☆'
|
||||||
|
THEME_CLOCK_CHECK=${THEME_CLOCK_CHECK:=true}
|
||||||
|
THEME_BATTERY_PERCENTAGE_CHECK=${THEME_BATTERY_PERCENTAGE_CHECK:=true}
|
||||||
|
|
||||||
SCM_GIT_SHOW_DETAILS=${SCM_GIT_SHOW_DETAILS:=true}
|
SCM_GIT_SHOW_DETAILS=${SCM_GIT_SHOW_DETAILS:=true}
|
||||||
|
|
||||||
SCM_GIT='git'
|
SCM_GIT='git'
|
||||||
|
|
@ -291,11 +295,28 @@ function prompt_char {
|
||||||
scm_char
|
scm_char
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clock_char {
|
||||||
|
if [[ "${THEME_CLOCK_CHECK}" = true ]]; then
|
||||||
|
DATE_STRING=$(date +"%Y-%m-%d %H:%M:%S")
|
||||||
|
echo -e "${bold_cyan}$DATE_STRING ${red}$CLOCK_CHAR"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function battery_char {
|
||||||
|
if [[ "${THEME_BATTERY_PERCENTAGE_CHECK}" = true ]]; then
|
||||||
|
echo -e "${bold_red}$(battery_percentage)%"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if [ ! -e $BASH_IT/plugins/enabled/battery.plugin.bash ]; then
|
if [ ! -e $BASH_IT/plugins/enabled/battery.plugin.bash ]; then
|
||||||
# if user has installed battery plugin, skip this...
|
# if user has installed battery plugin, skip this...
|
||||||
function battery_charge (){
|
function battery_charge (){
|
||||||
# no op
|
# no op
|
||||||
echo -n
|
echo -n
|
||||||
|
}
|
||||||
|
|
||||||
|
function battery_char (){
|
||||||
|
# no op
|
||||||
|
echo -n
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ RVM_THEME_PROMPT_SUFFIX="|"
|
||||||
|
|
||||||
function prompt_command() {
|
function prompt_command() {
|
||||||
#PS1="${bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(ruby_version_prompt) ${yellow}\h ${reset_color}in ${green}\w ${reset_color}\n${green}→${reset_color} "
|
#PS1="${bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(ruby_version_prompt) ${yellow}\h ${reset_color}in ${green}\w ${reset_color}\n${green}→${reset_color} "
|
||||||
PS1="\n${yellow}$(ruby_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} "
|
PS1="\n$(battery_char) $(clock_char) ${yellow}$(ruby_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} "
|
||||||
}
|
}
|
||||||
|
|
||||||
PROMPT_COMMAND=prompt_command;
|
PROMPT_COMMAND=prompt_command;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue