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
|
### CHARACTERS
|
||||||
|
|
||||||
Special 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_BATTERY` (default: "⌁") in front of the battery charge
|
||||||
* `LP_MARK_ADAPTER` (default: "⏚") displayed when plugged
|
* `LP_MARK_ADAPTER` (default: "⏚") displayed when plugged
|
||||||
* `LP_MARK_LOAD` (default: "⌂") in front of the load
|
* `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_ENABLE_SSH_COLORS=${LP_ENABLE_SSH_COLORS:-0}
|
||||||
LP_DISABLED_VCS_PATH=${LP_DISABLED_VCS_PATH:-""}
|
LP_DISABLED_VCS_PATH=${LP_DISABLED_VCS_PATH:-""}
|
||||||
|
|
||||||
|
LP_MARK_DEFAULT=${LP_MARK_DEFAULT:-""}
|
||||||
LP_MARK_BATTERY=${LP_MARK_BATTERY:-"⌁"}
|
LP_MARK_BATTERY=${LP_MARK_BATTERY:-"⌁"}
|
||||||
LP_MARK_ADAPTER=${LP_MARK_ADAPTER:-"⏚"}
|
LP_MARK_ADAPTER=${LP_MARK_ADAPTER:-"⏚"}
|
||||||
LP_MARK_LOAD=${LP_MARK_LOAD:-"⌂"}
|
LP_MARK_LOAD=${LP_MARK_LOAD:-"⌂"}
|
||||||
@ -1151,6 +1152,7 @@ _lp_load_color()
|
|||||||
[[ "$LP_ENABLE_LOAD" != 1 ]] && return
|
[[ "$LP_ENABLE_LOAD" != 1 ]] && return
|
||||||
|
|
||||||
local load
|
local load
|
||||||
|
local IFS=" \t\n"
|
||||||
load="$(_lp_cpu_load | sed 's/\.//g;s/^0*//g' )"
|
load="$(_lp_cpu_load | sed 's/\.//g;s/^0*//g' )"
|
||||||
let "load=${load:-0}/$_lp_CPUNUM"
|
let "load=${load:-0}/$_lp_CPUNUM"
|
||||||
|
|
||||||
@ -1251,9 +1253,12 @@ _lp_smart_mark()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local mark
|
local mark
|
||||||
mark="\\\$"
|
if [[ -n "$LP_MARK_DEFAULT" ]]; then
|
||||||
if [[ "$_LP_WORKING_SHELL" == "zsh" ]]; then
|
mark=$LP_MARK_DEFAULT
|
||||||
|
elif [[ "$_LP_WORKING_SHELL" == "zsh" ]]; then
|
||||||
mark="%(!.#.%%)"
|
mark="%(!.#.%%)"
|
||||||
|
else
|
||||||
|
mark="\\\$"
|
||||||
fi
|
fi
|
||||||
if [[ "$1" == "git" ]]; then
|
if [[ "$1" == "git" ]]; then
|
||||||
mark=$LP_MARK_GIT
|
mark=$LP_MARK_GIT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user