Add theme library and fix HawolexV2 layout

This commit is contained in:
2026-01-24 16:10:06 +00:00
parent a6b588ad8a
commit 9774c15d34
3 changed files with 268 additions and 2 deletions

View File

@@ -776,10 +776,34 @@ ${H_Z2_BG}${H_Z2_FG} ${HOST_PART}${PATH_SEP}${H_PATH_FG}${PATH_PART}${END_PAD}${
local HV2_SEP23="\[\e[38;5;56m\]\[\e[48;5;55m\]${HV2_SEP}${RST}"
local HV2_SEP34="\[\e[38;5;31m\]\[\e[48;5;56m\]${HV2_SEP}${RST}"
local HV2_SEP45="\[\e[38;5;30m\]\[\e[48;5;31m\]${HV2_SEP}${RST}"
PS1="\
local HV2_P1="" HV2_P2="" HV2_P3=""
local HV2_LAYOUT="${__PS1_CONTEST_LAYOUT:-day-time-user}"
if [[ "$__PS1_STYLE_PACK" == "contest" || "$__PS1_STYLE_PACK" == "holiday" ]]; then
case "$HV2_LAYOUT" in
user-time) HV2_P1="\\u"; HV2_P2="\\A" ;;
time-user) HV2_P1="\\A"; HV2_P2="\\u" ;;
day-time) HV2_P1="\\d"; HV2_P2="\\A" ;;
*) HV2_P1="\\d"; HV2_P2="\\A"; HV2_P3="\\u" ;;
esac
else
HV2_P1="\\d"; HV2_P2="\\A"; HV2_P3="\\u"
fi
local HV2_HOST="@\\h"
local HV2_PATH_PREFIX=""
if [[ "$__PS1_STYLE_PACK" == "contest" || "$__PS1_STYLE_PACK" == "holiday" ]]; then
HV2_PATH_PREFIX="- "
fi
if [[ -n "$HV2_P3" ]]; then
PS1="\
${PREFIX}${HV2_FRAME}╭─${RST}\
${HV2_LEFT_FG}${HV2_LEFT}${RST}${HV2_1_BG}${HV2_1_FG} \\d ${RST}${HV2_SEP12}${HV2_2_BG}${HV2_2_FG} \\A ${RST}${HV2_SEP23}${HV2_3_BG}${HV2_3_FG} \\u ${RST}${HV2_SEP34}${HV2_4_BG}${HV2_4_FG} ${L_HOST} ${RST}${HV2_SEP45}${HV2_5_BG}${HV2_PATH_FG} ${__PS1_PATH}${END_PAD}${RST}${HV2_RIGHT_FG}${HV2_RIGHT}${RST}\
${HV2_LEFT_FG}${HV2_LEFT}${RST}${HV2_1_BG}${HV2_1_FG} ${HV2_P1} ${RST}${HV2_SEP12}${HV2_2_BG}${HV2_2_FG} ${HV2_P2} ${RST}${HV2_SEP23}${HV2_3_BG}${HV2_3_FG} ${HV2_P3} ${RST}${HV2_SEP34}${HV2_4_BG}${HV2_4_FG} ${HV2_HOST} ${RST}${HV2_SEP45}${HV2_5_BG}${HV2_PATH_FG} ${HV2_PATH_PREFIX}${__PS1_PATH}${END_PAD}${RST}${HV2_RIGHT_FG}${HV2_RIGHT}${RST}\
\n${HV2_FRAME}╰── ${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
else
PS1="\
${PREFIX}${HV2_FRAME}╭─${RST}\
${HV2_LEFT_FG}${HV2_LEFT}${RST}${HV2_1_BG}${HV2_1_FG} ${HV2_P1} ${RST}${HV2_SEP12}${HV2_2_BG}${HV2_2_FG} ${HV2_P2} ${RST}${HV2_SEP23}${HV2_3_BG}${HV2_3_FG} ${HV2_HOST} ${RST}${HV2_SEP34}${HV2_4_BG}${HV2_4_FG} ${HV2_PATH_PREFIX}${__PS1_PATH}${END_PAD}${RST}${HV2_RIGHT_FG}${HV2_RIGHT}${RST}\
\n${HV2_FRAME}╰── ${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
fi
;;
radar)
local R_FRAME="\[\e[38;5;22m\]"