liquidize the time feature

This commit is contained in:
nojhan 2012-08-17 16:31:45 +02:00
parent b7459e1db8
commit 05defce9d2
4 changed files with 13 additions and 5 deletions

View File

@ -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}"

View File

@ -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=""

View File

@ -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)

View File

@ -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: