diff --git a/liquid.ps1 b/liquid.ps1 index 04672e9..c10765b 100644 --- a/liquid.ps1 +++ b/liquid.ps1 @@ -17,12 +17,13 @@ # LP_SVN subversion # LP_ERR last error code # LP_MARK prompt mark +# LP_TIME current time # Remember that most features come with their corresponding colors, # see the README. # add jobs, load and battery -LP_PS1="${LP_BATT}${LP_LOAD}${LP_JOBS}" +LP_PS1="${LP_TIME}${LP_BATT}${LP_LOAD}${LP_JOBS}" # add user, host and permissions colon LP_PS1="${LP_PS1}[${LP_USER}${LP_HOST}${LP_PERM}" diff --git a/liquid.theme b/liquid.theme index b821eb6..3fefbfc 100644 --- a/liquid.theme +++ b/liquid.theme @@ -82,6 +82,9 @@ LP_COLOR_CHARGING_UNDER="$YELLOW" # charging but under threshold LP_COLOR_DISCHARGING_ABOVE="$YELLOW" # discharging but above threshold LP_COLOR_DISCHARGING_UNDER="$RED" # discharging and under threshold +# Time +LP_COLOR_TIME="$BLUE" + # Color maps (battery and load levels) # Range from 0 (nothing special) to 9 (alert) LP_COLORMAP_0="" diff --git a/liquidprompt b/liquidprompt index 4787bef..b66333a 100755 --- a/liquidprompt +++ b/liquidprompt @@ -198,7 +198,7 @@ LP_ENABLE_BATT=${LP_ENABLE_BATT:-1} LP_ENABLE_GIT=${LP_ENABLE_GIT:-1} LP_ENABLE_SVN=${LP_ENABLE_SVN:-1} LP_ENABLE_HG=${LP_ENABLE_HG:-1} -LP_ENABLE_TIME=${LP_ENABLE_TIME:-1} +LP_ENABLE_TIME=${LP_ENABLE_TIME:-0} LP_MARK_BATTERY=${LP_MARK_BATTERY:-"⌁"} LP_MARK_ADAPTER=${LP_MARK_ADAPTER:-"⏚"} @@ -234,7 +234,7 @@ LP_COLOR_CHARGING_ABOVE=${LP_COLOR_CHARGING_ABOVE:-$GREEN} LP_COLOR_CHARGING_UNDER=${LP_COLOR_CHARGING_UNDER:-$YELLOW} LP_COLOR_DISCHARGING_ABOVE=${LP_COLOR_DISCHARGING_ABOVE:-$YELLOW} LP_COLOR_DISCHARGING_UNDER=${LP_COLOR_DISCHARGING_UNDER:-$RED} -LP_COLOR_TIME=${LP_COLOR_TIME:-$RED} +LP_COLOR_TIME=${LP_COLOR_TIME:-$BLUE} LP_COLORMAP_0=${LP_COLORMAP_0:-""} LP_COLORMAP_1=${LP_COLORMAP_1:-$GREEN} @@ -941,7 +941,7 @@ _lp_sb() _lp_time() { [[ "$LP_ENABLE_TIME" != 1 ]] && return - echo -ne " (${LP_COLOR_TIME}$(date +%H:%M:%S)${NO_COL}) " + echo -ne "${LP_COLOR_TIME}$(date +%H:%M:%S)${NO_COL}" } @@ -962,7 +962,7 @@ _lp_set_prompt() LP_JOBS=$(_lp_sr "$(_lp_jobcount_color)") LP_LOAD=$(_lp_sr "$(_lp_load_color)") LP_BATT=$(_lp_sr "$(_lp_battery_color)") - LP_TIME=$(_lp_time) + LP_TIME=$(_lp_sr "$(_lp_time)") # in main prompt: no space LP_USER=$(_lp_user) diff --git a/liquidpromptrc-dist b/liquidpromptrc-dist index 067fb61..07c449c 100644 --- a/liquidpromptrc-dist +++ b/liquidpromptrc-dist @@ -64,4 +64,8 @@ LP_ENABLE_SVN=1 # Recommended value is 1 LP_ENABLE_HG=1 +# Show time of the last prompt display +# Recommended value is 0 +LP_ENABLE_TIME=0 + # vim: set et sts=4 sw=4 tw=120 ft=sh: