Update git emojis and move Hawolex to contest

- Add git state emojis and branch wrapping

- Move Hawolex to contest styles and update JSONs
This commit is contained in:
2026-01-24 12:01:55 +00:00
parent 059a642ff5
commit 21233b9083
5 changed files with 90 additions and 33 deletions

View File

@@ -89,11 +89,11 @@ _ps1_season() {
fi
}
# Style selection (aurora/neon/forge/circuit/mono/git)
# PS1_STYLE=aurora|neon|forge|circuit|mono|git
# Style selection (aurora/neon/forge/circuit/mono/git/hawolex)
# PS1_STYLE=aurora|neon|forge|circuit|mono|git|hawolex
# PS1_STYLE_PACK=standard|contest|holiday
# PS1_CONTEST_LAYOUT=day-time-user|user-time|time-user|day-time
# PS1_HOLIDAY=christmas|easter|halloween|valentine|thanksgiving|newyear|hawolex
# PS1_HOLIDAY=christmas|easter|halloween|valentine|thanksgiving|newyear
# Also reads config from /etc/ps1-style or ~/.config/ps1/style
_ps1_style_config() {
local cfg=""
@@ -155,6 +155,36 @@ __try_source_git_prompt() {
}
__try_source_git_prompt >/dev/null 2>&1
__git_capsule() {
if ! declare -F __git_ps1 >/dev/null 2>&1; then
return 0
fi
local info status=""
local clean="✨"
local dirty="🔨"
local staged="📌"
local untracked="🧷"
local stashed="📦"
info="$(__git_ps1 "%s" 2>/dev/null)"
[[ -z "$info" ]] && return 0
if [[ "$info" == *"*"* ]]; then status+=" $dirty"; fi
if [[ "$info" == *"+"* ]]; then status+=" $staged"; fi
if [[ "$info" == *"%"* ]]; then status+=" $untracked"; fi
if [[ "$info" == *"$"* ]]; then status+=" $stashed"; fi
if [[ -z "$status" ]]; then status=" $clean"; fi
info="${info//\%/}"
info="${info//\*/}"
info="${info//\+/}"
info="${info//\$/}"
info="$(printf "%s" "$info" | xargs)"
printf " ⟦%s⟧%s" "$info" "$status"
}
__git_capsule() {
if declare -F __git_ps1 >/dev/null 2>&1; then
__git_ps1 " (%s)" 2>/dev/null
@@ -181,6 +211,7 @@ _ps1_pick_icon() {
valentine) offset=109 ;;
thanksgiving) offset=131 ;;
newyear) offset=151 ;;
hawolex) offset=173 ;;
*) offset=0 ;;
esac
@@ -206,7 +237,12 @@ _ps1_symbol() {
local sunrise coffee work evening night
local -a sunrise_list work_list
if [[ "$pack" == "contest" ]]; then
if [[ "$__PS1_STYLE" == "hawolex" ]]; then
rot_season="hawolex"
sunrise_list=( "💻" "🚗" "🔊" "🎮" )
work_list=( "🎧" "🕹️" "📟" "🧩" )
coffee="☕"; evening="🌆"; night="🌙"
elif [[ "$pack" == "contest" ]]; then
rot_season="winter"
sunrise_list=( "⚡️" "🛰️" "🧬" "🧠" )
work_list=( "🛠️" "💾" "🧪" "🧩" )
@@ -244,11 +280,6 @@ _ps1_symbol() {
work_list=( "🗓️" "⏳" "🚀" "✨" )
coffee="☕"; evening="🌆"; night="🌙"
;;
hawolex)
sunrise_list=( "💻" "🚗" "🔊" "🎮" )
work_list=( "🎧" "🕹️" "📟" "🧩" )
coffee="☕"; evening="🌆"; night="🌙"
;;
*)
sunrise_list=( "🎉" "✨" "🎊" "🌟" )
work_list=( "🧩" "🛠️" "💾" "🧪" )
@@ -381,14 +412,6 @@ _ps1_set_prompt() {
PATH_FG="\[\e[38;5;229m\]"
FRAME="\[\e[38;5;19m\]"
;;
hawolex)
Z1_BG="\[\e[48;5;54m\]"
Z1_FG="\[\e[38;5;255m\]"
Z2_BG="\[\e[48;5;31m\]"
Z2_FG="\[\e[38;5;255m\]"
PATH_FG="\[\e[38;5;230m\]"
FRAME="\[\e[38;5;24m\]"
;;
*)
Z1_BG="\[\e[48;5;24m\]"
Z1_FG="\[\e[38;5;255m\]"
@@ -523,6 +546,7 @@ ${PREFIX}${M_FG}⟦${L1}⟧ ${M_DIM}${HOST_PART}${PATH_SEP}${M_FG}${PATH_PART}${
git)
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
local G_FRAME="\[\e[38;5;60m\]"
local G_Z1_BG="\[\e[48;5;61m\]"
local G_Z1_FG="\[\e[38;5;255m\]"
@@ -536,6 +560,19 @@ ${G_Z1_BG}${G_Z1_FG}${left} ${L1} ${RST}${G_Z1_BG}${G_Z2_BG}${G_Z2_FG}${sep}${RS
${G_Z2_BG}${G_Z2_FG} ${HOST_PART}${PATH_SEP}${G_PATH_FG}${PATH_PART} ${RST}${G_Z2_BG}${G_Z2_FG}${right}${RST}\
\n${G_FRAME}╰── ${RST}${prompt_sym} ${__PS1_SYM}${GIT_INFO} "
;;
hawolex)
local H_FRAME="\[\e[38;5;24m\]"
local H_Z1_BG="\[\e[48;5;54m\]"
local H_Z1_FG="\[\e[38;5;255m\]"
local H_Z2_BG="\[\e[48;5;31m\]"
local H_Z2_FG="\[\e[38;5;255m\]"
local H_PATH_FG="\[\e[38;5;230m\]"
PS1="\
${PREFIX}${H_FRAME}╭─${RST}\
${H_Z1_BG}${H_Z1_FG}${left} ${L1} ${RST}${H_Z1_BG}${H_Z2_BG}${H_Z2_FG}${sep}${RST}\
${H_Z2_BG}${H_Z2_FG} ${HOST_PART}${PATH_SEP}${H_PATH_FG}${PATH_PART} ${RST}${H_Z2_BG}${H_Z2_FG}${right}${RST}\
\n${H_FRAME}╰── ${RST}${prompt_sym} ${__PS1_SYM} "
;;
*)
# aurora (default)
PS1="\