Add seasonal emoji accents

- Keep lunch/dinner fixed and vary other time emojis by season
This commit is contained in:
2026-01-24 09:35:47 +00:00
parent 633704b777
commit fbd5fc40e2

View File

@@ -37,19 +37,37 @@ _ps1_has_nf() {
return 1 return 1
} }
# Time-based emoji (Europe/Oslo) # Time-based emoji with seasonal accents (Europe/Oslo)
_ps1_symbol() { _ps1_symbol() {
local hh mm h m local hh mm h m
hh=$(TZ=Europe/Oslo date +%H); mm=$(TZ=Europe/Oslo date +%M) hh=$(TZ=Europe/Oslo date +%H); mm=$(TZ=Europe/Oslo date +%M)
h=$((10#$hh)); m=$((10#$mm)) h=$((10#$hh)); m=$((10#$mm))
if (( h >= 5 && h <= 8 )); then echo "🌅" local season="${__PS1_SEASON:-winter}"
elif (( h >= 9 && h <= 10 )); then echo "☕" local sunrise coffee work evening night
case "$season" in
spring)
sunrise="🌷"; coffee="☕"; work="🌿"; evening="🌤"; night="🌙"
;;
summer)
sunrise="🌞"; coffee="🧃"; work="🪴"; evening="🌇"; night="🌙"
;;
autumn)
sunrise="🍁"; coffee="☕"; work="🍂"; evening="🌆"; night="🌙"
;;
*)
sunrise="🌅"; coffee="☕"; work="❄️"; evening="🌆"; night="🌙"
;;
esac
if (( h >= 5 && h <= 8 )); then echo "$sunrise"
elif (( h >= 9 && h <= 10 )); then echo "$coffee"
elif (( h == 11 && m < 30 )); then echo "🥪" elif (( h == 11 && m < 30 )); then echo "🥪"
elif (( (h == 11 && m >= 30) || (h >= 12 && h <= 15) )); then echo "💻" elif (( (h == 11 && m >= 30) || (h >= 12 && h <= 15) )); then echo "$work"
elif (( h == 16 )); then echo "🍲" elif (( h == 16 )); then echo "🍲"
elif (( h >= 17 && h <= 22 )); then echo "🌆" elif (( h >= 17 && h <= 22 )); then echo "$evening"
else echo "🌙" else echo "$night"
fi fi
} }