✨ feat(form): let callers preselect a fallback timezone

- ✨ an offline install has no geo guess, so the timezone list opened on Africa/Abidjan; a caller-supplied zone now stands in for the missing guess
- ✅ a successful geo guess still outranks the fallback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdXqTwm63rRMwotZ1xqLC8
This commit is contained in:
Kros DaiandClaude Opus 5.5 committed 2026-10-06 22:14:56 -04:00
1 parent 3e00a48c00
commit d53b24cfc7
2 files changed
+18 -2

No files matched your search

+4 -1
View File
@@ -167,10 +167,13 @@ omarchy_prompt_hostname() {
}
# A fresh machine often hasn't joined a network yet, so the geo guess fails
# often; guard it or a `set -e` caller dies before the filter fallback.
# often; guard it or a `set -e` caller dies before the filter fallback. Callers
# may pass the zone to preselect when there is no guess (a region's default),
# so an offline install does not open on the top of an alphabetical list.
omarchy_prompt_timezone() {
local guess status
guess=$(tzupdate -p 2>/dev/null) || guess=""
[[ -n $guess ]] || guess="${1:-}"
if [[ -n $guess ]]; then
timezone=$(timedatectl list-timezones | gum choose --height 10 --selected "$guess" --header "Timezone") && status=0 || status=$?