Merge branch 'develop' of github.com:nojhan/liquidprompt into develop
This commit is contained in:
commit
f483697fda
@ -277,6 +277,7 @@ Set to a null string "" if you do not want color.
|
||||
### CHARACTERS
|
||||
|
||||
Special characters:
|
||||
* `LP_MARK_DEFAULT` (default: "") the mark you want at the end of your prompt (leave to empty for your shell default mark)
|
||||
* `LP_MARK_BATTERY` (default: "⌁") in front of the battery charge
|
||||
* `LP_MARK_ADAPTER` (default: "⏚") displayed when plugged
|
||||
* `LP_MARK_LOAD` (default: "⌂") in front of the load
|
||||
|
@ -227,6 +227,7 @@ _lp_source_config()
|
||||
LP_ENABLE_SSH_COLORS=${LP_ENABLE_SSH_COLORS:-0}
|
||||
LP_DISABLED_VCS_PATH=${LP_DISABLED_VCS_PATH:-""}
|
||||
|
||||
LP_MARK_DEFAULT=${LP_MARK_DEFAULT:-""}
|
||||
LP_MARK_BATTERY=${LP_MARK_BATTERY:-"⌁"}
|
||||
LP_MARK_ADAPTER=${LP_MARK_ADAPTER:-"⏚"}
|
||||
LP_MARK_LOAD=${LP_MARK_LOAD:-"⌂"}
|
||||
@ -1151,6 +1152,7 @@ _lp_load_color()
|
||||
[[ "$LP_ENABLE_LOAD" != 1 ]] && return
|
||||
|
||||
local load
|
||||
local IFS=" \t\n"
|
||||
load="$(_lp_cpu_load | sed 's/\.//g;s/^0*//g' )"
|
||||
let "load=${load:-0}/$_lp_CPUNUM"
|
||||
|
||||
@ -1251,9 +1253,12 @@ _lp_smart_mark()
|
||||
fi
|
||||
|
||||
local mark
|
||||
mark="\\\$"
|
||||
if [[ "$_LP_WORKING_SHELL" == "zsh" ]]; then
|
||||
if [[ -n "$LP_MARK_DEFAULT" ]]; then
|
||||
mark=$LP_MARK_DEFAULT
|
||||
elif [[ "$_LP_WORKING_SHELL" == "zsh" ]]; then
|
||||
mark="%(!.#.%%)"
|
||||
else
|
||||
mark="\\\$"
|
||||
fi
|
||||
if [[ "$1" == "git" ]]; then
|
||||
mark=$LP_MARK_GIT
|
||||
|
Loading…
x
Reference in New Issue
Block a user