Add seasonal emoji accents
- Keep lunch/dinner fixed and vary other time emojis by season
This commit is contained in:
@@ -37,19 +37,37 @@ _ps1_has_nf() {
|
||||
return 1
|
||||
}
|
||||
|
||||
# Time-based emoji (Europe/Oslo)
|
||||
# Time-based emoji with seasonal accents (Europe/Oslo)
|
||||
_ps1_symbol() {
|
||||
local hh mm h m
|
||||
hh=$(TZ=Europe/Oslo date +%H); mm=$(TZ=Europe/Oslo date +%M)
|
||||
h=$((10#$hh)); m=$((10#$mm))
|
||||
|
||||
if (( h >= 5 && h <= 8 )); then echo "🌅"
|
||||
elif (( h >= 9 && h <= 10 )); then echo "☕"
|
||||
local season="${__PS1_SEASON:-winter}"
|
||||
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) || (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 >= 17 && h <= 22 )); then echo "🌆"
|
||||
else echo "🌙"
|
||||
elif (( h >= 17 && h <= 22 )); then echo "$evening"
|
||||
else echo "$night"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user