Commit f483697f authored by nojhan's avatar nojhan
Browse files

Merge branch 'develop' of github.com:nojhan/liquidprompt into develop

parents 91959b63 86fc2126
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment