Compare commits

...

5 Commits

Author SHA1 Message Date
a139767607 Merge branch 'dev' into 4seasons 2026-01-24 09:55:31 +00:00
da123e9574 Add compressed emoji palette to README 2026-01-24 09:51:02 +00:00
91824d6160 Rotate seasonal sunrise/work emojis
- Add per-season emoji sets and daily rotation
2026-01-24 09:49:16 +00:00
aa76832710 Use mountain icon for winter sunrise
- Replace winter sunrise emoji with 🏔️
2026-01-24 09:47:07 +00:00
36ef66979b Add seasonal emoji accents
- Keep lunch/dinner fixed and vary other time emojis by season
2026-01-24 09:37:50 +00:00
2 changed files with 79 additions and 7 deletions

View File

@@ -182,6 +182,22 @@ When installing PS1 you can choose:
---
## 😀 Emoji palette (compressed)
Fixed times (all seasons):
- Lunch 11:0011:29 = 🥪
- Dinner 16:0016:59 = 🍲
Seasonal sets (sunrise / work):
- Spring: 🌷 🌱 🐣 🌤 / 🌿 🪴 🐝 🌼
- Summer: 🌞 🏖️ 🌅 🌤 / 🏄 🏖️ 🚤 🌴
- Autumn: 🍁 🍂 🌫️ 🌦️ / 🍂 🍄 🎃 🪵
- Winter: 🏔️ 🌨️ ❄️ 🌌 / 🎿 ⛷️ 🏂 🧊
---
## 🗂️ Repo Structure
```text

View File

@@ -89,19 +89,75 @@ _ps1_season() {
fi
}
# Time-based emoji (Europe/Oslo)
# Time-based emoji with seasonal accents (Europe/Oslo)
_ps1_pick_icon() {
local list_name="$1"
local season="$2"
local day
local -a list
local idx
local offset=0
day=$(TZ=Europe/Oslo date +%j)
case "$season" in
spring) offset=11 ;;
summer) offset=23 ;;
autumn) offset=37 ;;
*) offset=0 ;;
esac
eval "list=(\"\${${list_name}[@]}\")"
if ((${#list[@]} == 0)); then
echo ""
return
fi
idx=$(( (10#$day + offset) % ${#list[@]} ))
echo "${list[$idx]}"
}
_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
local -a sunrise_list work_list
case "$season" in
spring)
sunrise_list=( "🌷" "🌱" "🐣" "🌤" )
work_list=( "🌿" "🪴" "🐝" "🌼" )
coffee="☕"; evening="🌤"; night="🌙"
;;
summer)
sunrise_list=( "🌞" "🏖️" "🌅" "🌤" )
work_list=( "🏄" "🏖️" "🚤" "🌴" )
coffee="🧃"; evening="🌇"; night="🌙"
;;
autumn)
sunrise_list=( "🍁" "🍂" "🌫️" "🌦️" )
work_list=( "🍂" "🍄" "🎃" "🪵" )
coffee="☕"; evening="🌆"; night="🌙"
;;
*)
sunrise_list=( "🏔️" "🌨️" "❄️" "🌌" )
work_list=( "🎿" "⛷️" "🏂" "🧊" )
coffee="☕"; evening="🌆"; night="🌙"
;;
esac
sunrise="$(_ps1_pick_icon sunrise_list "$season")"
work="$(_ps1_pick_icon work_list "$season")"
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
}
@@ -198,9 +254,9 @@ ${Z2_BG}${Z2_FG} @\\h ${PATH_FG}${__PS1_PATH}${RST}${Z2_BG}${Z2_FG}${right}${RST
_ps1_update() {
__PS1_STATUS=$?
__PS1_SEASON="$(_ps1_season)"
__PS1_SYM="$(_ps1_symbol)"
__PS1_PATH="$(_ps1_path)"
__PS1_SEASON="$(_ps1_season)"
if _ps1_has_nf; then __PS1_USE_NF=1; else __PS1_USE_NF=0; fi
_ps1_set_prompt
}