fixes
This commit is contained in:
parent
72964cbaee
commit
bae9daf731
3 changed files with 31 additions and 23 deletions
|
|
@ -10,6 +10,9 @@ _lp_liquidship_theme_activate() {
|
||||||
__lp_foreground_color 11
|
__lp_foreground_color 11
|
||||||
local YELLOW="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
|
local YELLOW="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
|
||||||
|
|
||||||
|
__lp_foreground_color 9
|
||||||
|
local RED="${_LP_OPEN_ESC}${af_color}${_LP_CLOSE_ESC}"
|
||||||
|
|
||||||
NO_COL="${_LP_OPEN_ESC}${_LP_TI_RESET-}${_LP_CLOSE_ESC}"
|
NO_COL="${_LP_OPEN_ESC}${_LP_TI_RESET-}${_LP_CLOSE_ESC}"
|
||||||
|
|
||||||
# Liquid Prompt reconfig
|
# Liquid Prompt reconfig
|
||||||
|
|
@ -50,7 +53,7 @@ _lp_liquidship_theme_activate() {
|
||||||
# The user or connection type is not expected to change from inside the
|
# The user or connection type is not expected to change from inside the
|
||||||
# shell, so we build this just once.
|
# shell, so we build this just once.
|
||||||
if _lp_username_color; then
|
if _lp_username_color; then
|
||||||
LP_USER="$lp_username_color in "
|
LP_USER="$lp_username_color"
|
||||||
else
|
else
|
||||||
LP_USER=
|
LP_USER=
|
||||||
fi
|
fi
|
||||||
|
|
@ -62,7 +65,7 @@ _lp_liquidship_theme_activate() {
|
||||||
if _lp_multiplexer; then
|
if _lp_multiplexer; then
|
||||||
LP_LIQUIDSHIP_MUX="in ${LP_COLOR_IN_MULTIPLEXER}${LP_LIQUIDSHIP_MARK_MUX}${NO_COL} "
|
LP_LIQUIDSHIP_MUX="in ${LP_COLOR_IN_MULTIPLEXER}${LP_LIQUIDSHIP_MARK_MUX}${NO_COL} "
|
||||||
else
|
else
|
||||||
LP_LIQUIDSHIP_MARK_MUX=
|
LP_LIQUIDSHIP_MUX=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_lp_terminal_device
|
_lp_terminal_device
|
||||||
|
|
@ -118,6 +121,8 @@ _lp_liquidship_theme_prompt_data() {
|
||||||
if _lp_sudo_active_color; then
|
if _lp_sudo_active_color; then
|
||||||
# LP_COLOR_MARK="$lp_sudo_active_color"
|
# LP_COLOR_MARK="$lp_sudo_active_color"
|
||||||
LP_LIQUIDSHIP_SUDO="${LP_COLOR_MARK_SUDO}${LP_LIQUIDSHIP_MARK_SUDO}${NO_COL} "
|
LP_LIQUIDSHIP_SUDO="${LP_COLOR_MARK_SUDO}${LP_LIQUIDSHIP_MARK_SUDO}${NO_COL} "
|
||||||
|
else
|
||||||
|
LP_LIQUIDSHIP_SUDO=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if _lp_dirstack_color; then
|
if _lp_dirstack_color; then
|
||||||
|
|
@ -234,9 +239,9 @@ _lp_liquidship_theme_prompt_template() {
|
||||||
if [[ -z "${LP_PS1-}" ]]; then
|
if [[ -z "${LP_PS1-}" ]]; then
|
||||||
# Docker is displayed along with Singularity and Kubernetes (strange that it is not the case in Starship…),
|
# Docker is displayed along with Singularity and Kubernetes (strange that it is not the case in Starship…),
|
||||||
# in the container section, which is not duplicated at the end, like in Starship (WTF?).
|
# in the container section, which is not duplicated at the end, like in Starship (WTF?).
|
||||||
local n='\n'
|
local n=$'\n'
|
||||||
PS1="${LP_USER}${LP_HOST}${LP_LIQUIDSHIP_MUX}${LP_SHLVL}${LP_DIRSTACK}at ${LP_PWD}${LP_PERM} ${LP_VCS}${LP_CONTAINER}${LP_KUBECONTEXT}${LP_CMAKE}${LP_NODE_VENV}${LP_VENV}${LP_TFSPACE}${LP_AWS_PROFILE}${LP_PROXY}${LP_PS1_POSTFIX}${LP_RUNTIME}${n}"
|
PS1="${LP_USER}${LP_HOST}${LP_LIQUIDSHIP_MUX}${LP_SHLVL}${LP_DIRSTACK}at ${LP_PWD}${LP_PERM} ${LP_VCS}${LP_CONTAINER}${LP_KUBECONTEXT}${LP_CMAKE}${LP_NODE_VENV}${LP_VENV}${LP_TFSPACE}${LP_AWS_PROFILE}${LP_PROXY}${LP_PS1_POSTFIX}${LP_RUNTIME}${n}"
|
||||||
PS1+="${LP_TIME}${LP_WIFI}${LP_TEMP}${LP_LOAD}${LP_BATTERY}${LP_JOBS}${LP_LIQUIDSHIP_SUDO}${LP_ERR}${LP_COLOR_MARK}${LP_MARK}"
|
PS1+="${LP_TIME}${LP_WIFI}${LP_TEMP}${LP_LOAD}${LP_BATT}${LP_JOBS}${LP_LIQUIDSHIP_SUDO}${LP_ERR}${LP_COLOR_MARK}${LP_MARK}"
|
||||||
|
|
||||||
# Get the core sections without prompt escapes and make them into a title.
|
# Get the core sections without prompt escapes and make them into a title.
|
||||||
_lp_formatted_title "${LP_PS1_PREFIX}${LP_BRACKET_OPEN}${LP_USER}${LP_HOST}${LP_MARK_PERM}${lp_path-}${LP_BRACKET_CLOSE}${LP_MARK_PREFIX}${LP_SHLVL}${LP_MARK}${LP_PS1_POSTFIX}"
|
_lp_formatted_title "${LP_PS1_PREFIX}${LP_BRACKET_OPEN}${LP_USER}${LP_HOST}${LP_MARK_PERM}${lp_path-}${LP_BRACKET_CLOSE}${LP_MARK_PREFIX}${LP_SHLVL}${LP_MARK}${LP_PS1_POSTFIX}"
|
||||||
|
|
|
||||||
13
pure.theme
13
pure.theme
|
|
@ -121,6 +121,7 @@ _lp_pure_theme_activate() {
|
||||||
|
|
||||||
LP_COLOR_PATH="$BLUE"
|
LP_COLOR_PATH="$BLUE"
|
||||||
LP_COLOR_PATH_SEPARATOR="$BLUE"
|
LP_COLOR_PATH_SEPARATOR="$BLUE"
|
||||||
|
LP_COLOR_PATH_SHORTENED="$BLUE"
|
||||||
LP_COLOR_PATH_VCS_ROOT="$BOLD"
|
LP_COLOR_PATH_VCS_ROOT="$BOLD"
|
||||||
LP_COLOR_PATH_LAST_DIR="$BOLD"
|
LP_COLOR_PATH_LAST_DIR="$BOLD"
|
||||||
LP_COLOR_PATH_ROOT="$BOLD_YELLOW"
|
LP_COLOR_PATH_ROOT="$BOLD_YELLOW"
|
||||||
|
|
@ -213,7 +214,8 @@ _lp_pure_theme_prompt_template() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${LP_PS1-}" ]]; then
|
if [[ -z "${LP_PS1-}" ]]; then
|
||||||
PS1="${LP_USER}${LP_HOST}${LP_PWD}${LP_VCS}${LP_RUNTIME}\n${LP_VENV}${LP_JOBS}"
|
local n=$'\n'
|
||||||
|
PS1="${LP_USER}${LP_HOST}${LP_PWD}${LP_VCS}${LP_RUNTIME}${n}${LP_VENV}${LP_JOBS}"
|
||||||
|
|
||||||
if [[ -n "${LP_ERR}" ]] ; then
|
if [[ -n "${LP_ERR}" ]] ; then
|
||||||
PS1+="${LP_COLOR_ERR}${LP_MARK} "
|
PS1+="${LP_COLOR_ERR}${LP_MARK} "
|
||||||
|
|
@ -222,7 +224,7 @@ _lp_pure_theme_prompt_template() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get the core sections without prompt escapes and make them into a title.
|
# Get the core sections without prompt escapes and make them into a title.
|
||||||
_lp_formatted_title "${LP_USER}${LP_HOST}${lp_path-}${LP_MARK}"
|
# _lp_formatted_title "${LP_USER}${LP_HOST}${lp_path-}${LP_MARK}"
|
||||||
else
|
else
|
||||||
PS1=$LP_PS1
|
PS1=$LP_PS1
|
||||||
fi
|
fi
|
||||||
|
|
@ -252,7 +254,7 @@ _lp_pure_vcs() {
|
||||||
if _lp_vcs_commits_off_remote; then
|
if _lp_vcs_commits_off_remote; then
|
||||||
lp_vcs_details_color="$LP_COLOR_COMMITS_BEHIND"
|
lp_vcs_details_color="$LP_COLOR_COMMITS_BEHIND"
|
||||||
if [[ "$lp_vcs_commit_ahead" -ne "0" && "$lp_vcs_commit_behind" -ne "0" ]]; then
|
if [[ "$lp_vcs_commit_ahead" -ne "0" && "$lp_vcs_commit_behind" -ne "0" ]]; then
|
||||||
has_commit="${LP_COLOR_COMMITS}${LP_PURE_GIT_UP_ARROW}{NO_COL}${LP_COLOR_COMMITS_BEHIND}${LP_PURE_GIT_DOWN_ARROW}${NO_COL}"
|
has_commit="${LP_COLOR_COMMITS}${LP_PURE_GIT_UP_ARROW}${NO_COL}${LP_COLOR_COMMITS_BEHIND}${LP_PURE_GIT_DOWN_ARROW}${NO_COL}"
|
||||||
elif [[ "$lp_vcs_commit_ahead" -ne "0" ]]; then
|
elif [[ "$lp_vcs_commit_ahead" -ne "0" ]]; then
|
||||||
has_commit="${LP_COLOR_COMMITS}${LP_PURE_GIT_UP_ARROW}${NO_COL}"
|
has_commit="${LP_COLOR_COMMITS}${LP_PURE_GIT_UP_ARROW}${NO_COL}"
|
||||||
lp_vcs_details_color="$LP_COLOR_COMMITS"
|
lp_vcs_details_color="$LP_COLOR_COMMITS"
|
||||||
|
|
@ -283,18 +285,17 @@ _lp_pure_vcs() {
|
||||||
if [[ -n "$has_lines" ]]; then
|
if [[ -n "$has_lines" ]]; then
|
||||||
lp_vcs_details_color+="${LP_COLOR_DIFF}${has_lines}${NO_COL}${has_commit}"
|
lp_vcs_details_color+="${LP_COLOR_DIFF}${has_lines}${NO_COL}${has_commit}"
|
||||||
fi
|
fi
|
||||||
lp_vcs_details_color+="${has_commit}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if _lp_vcs_head_status; then
|
if _lp_vcs_head_status; then
|
||||||
lp_vcs_details_color+=" $LP_COLOR_CHANGES$lp_vcs_head_status"
|
lp_vcs_details_color+=" ${LP_COLOR_CHANGES}${lp_vcs_head_status}"
|
||||||
if [[ -n "${lp_vcs_head_details-}" ]]; then
|
if [[ -n "${lp_vcs_head_details-}" ]]; then
|
||||||
lp_vcs_details_color+=" ${lp_vcs_head_details}"
|
lp_vcs_details_color+=" ${lp_vcs_head_details}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if _lp_vcs_stash_count; then
|
if _lp_vcs_stash_count; then
|
||||||
lp_vcs_details_color+=" $LP_COLOR_COMMITS$LP_MARK_STASH"
|
lp_vcs_details_color+=" ${LP_COLOR_COMMITS}${LP_MARK_STASH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pure does not show untracked files.
|
# Pure does not show untracked files.
|
||||||
|
|
|
||||||
|
|
@ -185,6 +185,8 @@ _lp_starship_theme_prompt_data() {
|
||||||
if _lp_sudo_active_color; then
|
if _lp_sudo_active_color; then
|
||||||
# LP_COLOR_MARK="$lp_sudo_active_color"
|
# LP_COLOR_MARK="$lp_sudo_active_color"
|
||||||
LP_STARSHIP_SUDO="${LP_COLOR_MARK_SUDO}${LP_STARSHIP_MARK_SUDO}${NO_COL} "
|
LP_STARSHIP_SUDO="${LP_COLOR_MARK_SUDO}${LP_STARSHIP_MARK_SUDO}${NO_COL} "
|
||||||
|
else
|
||||||
|
LP_STARSHIP_SUDO=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if _lp_dirstack_color; then
|
# if _lp_dirstack_color; then
|
||||||
|
|
@ -310,9 +312,9 @@ _lp_starship_theme_prompt_template() {
|
||||||
if [[ -z "${LP_PS1-}" ]]; then
|
if [[ -z "${LP_PS1-}" ]]; then
|
||||||
# Docker is displayed along with Singularity and Kubernetes (strange that it is not the case in Starship…),
|
# Docker is displayed along with Singularity and Kubernetes (strange that it is not the case in Starship…),
|
||||||
# in the container section, which is not duplicated at the end, like in Starship (WTF?).
|
# in the container section, which is not duplicated at the end, like in Starship (WTF?).
|
||||||
local n='\n'
|
local n=$'\n'
|
||||||
PS1="${LP_USER}${LP_HOST}${LP_SHLVL}${LP_CONTAINER}${LP_KUBECONTEXT}${LP_PWD}${LP_PERM} ${LP_VCS}${LP_CMAKE}${LP_NODE_VENV}${LP_VENV}${LP_TFSPACE}${LP_AWS_PROFILE}${LP_PS1_POSTFIX}${LP_STARSHIP_SUDO}${LP_RUNTIME}${n}"
|
PS1="${LP_USER}${LP_HOST}${LP_SHLVL}${LP_CONTAINER}${LP_KUBECONTEXT}${LP_PWD}${LP_PERM} ${LP_VCS}${LP_CMAKE}${LP_NODE_VENV}${LP_VENV}${LP_TFSPACE}${LP_AWS_PROFILE}${LP_PS1_POSTFIX}${LP_STARSHIP_SUDO}${LP_RUNTIME}${n}"
|
||||||
PS1+="${LP_JOBS}${LP_BATTERY}${LP_TIME}${LP_ERR}${LP_COLOR_MARK}${LP_MARK}"
|
PS1+="${LP_JOBS}${LP_BATT}${LP_TIME}${LP_ERR}${LP_COLOR_MARK}${LP_MARK}"
|
||||||
|
|
||||||
# No title support in Starship.
|
# No title support in Starship.
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue