Skip to content

omamobile-omarchy 0.1.18: the lock clock follows the bar's 12/24-hour setting - #185

Merged
derekross merged 1 commit into
mainfrom
lock-clock-sync
Oct 30, 2026
Merged

derekross merged 1 commit into
mainfrom
lock-clock-sync

Conversation

@derekross

Copy link
Copy Markdown
Owner

The lock glance showed 24-hour time while the bar and the home clock showed 12-hour (clockFormat ddd MMM d h:mm AP).

Two causes (patch 0023 revised in place, as #181 did):

  • The big time used Qt's h:mm, which counts 0–23 unless the same format has an AM/PM marker. So it could never be 12-hour. It's now built from the hour (Glance.glanceTime), still without AM/PM. The small PIN clock keeps h:mm AP.
  • shell.json was only read while the glance was active, asynchronously, and a missed read fell back to Qt's C/POSIX locale, which is 24-hour. It's now read at once, on every change and whenever the glance returns, and a failed or half-written read keeps the last format. The fallback is the bar's own default (HH:mm), so the bar, the home clock and the lock always agree.

Tests: test/lock-glance runs under LC_ALL=C (38/38). The series applies --fuzz=0 to the real aarch64 Omarchy 4.0.6-1. tools/pr-check passes.

Tested on the Pixel 7 Pro: the lock shows 12-hour time, matching the bar.

🤖 Generated with Claude Code

… setting

On the Pixel 7 Pro the lock glance showed a 24-hour time while the phone
bar and the home clock widget showed 12-hour. The bar's clockFormat in
~/.config/omarchy/shell.json is "ddd MMM d  h:mm AP". Two faults:

- The big glance time used the Qt format "h:mm". Qt counts "h" from 0
  to 23 unless the same format has an AM/PM marker, so even with the bar's
  format read, 2 pm showed as "14:02". It is now built from the hour
  (h % 12 || 12, with minutes) and still leaves AM/PM out. The small
  clock over the PIN view keeps "h:mm AP".
- shell.json was only read while the glance was active (path gated on
  the keypad toggle) and asynchronously. A failed read, such as Omarchy
  replacing the file, cleared the format, and the fallback was the
  session's Qt locale, which is C/POSIX for the shell and so 24-hour.
  It is now read at once (blockLoading, a small file), whatever the
  lock shows, again on every change and whenever the glance comes back.
  A read that fails or catches a half-written file keeps the last
  format.

The 12/24-hour rule stays the one the bar and the home clock use
(omamobile-shell HomeModel.systemTimeFormat): quoted literals ignored,
an AM/PM marker or "h" without "H" means 12-hour. Without a clockFormat
the lock now follows the bar's own default, HH:mm, so all three still
agree; it no longer falls back to the Qt locale. Patch 0023 is revised in
place, as #181 did after #176.

Tests (test/lock-glance, now under LC_ALL=C as the shell runs):
- the maintainer's format is 12-hour before the glance is active, with
  a 1-12 big time without AM/PM and a small clock with it;
- a half-written or missing shell.json keeps the last format;
- HH:mm and no clockFormat are 24-hour;
- the rule (twelveHour, quoted literals), glanceTime at 14:02, 00:05,
  12:30 and 9:41, and barClockFormat's parse.
The FileView stand-in now reads at once with blockLoading, as Quickshell
does. test/all and tools/pr-check pass, and the series applies with
--fuzz=0 to the real aarch64 Omarchy 4.0.6-1 (20 applied).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekross
derekross merged commit fcb0d86 into main Oct 30, 2026
2 checks passed
@derekross
derekross deleted the lock-clock-sync branch October 30, 2026 18:39
derekross added a commit that referenced this pull request Nov 7, 2026
The matrix re-read against what merged and ran on hardware since 2026-11-02:
- Pixel 7: Bluetooth and the torch move to testing (kernel #196, #197, #426); fingerprint moves to WIP (kernel #207; the package side, #458, is in review); AVB footers and reboot=warm noted.
- Pixel 8a: a new row, from first light and UFS behind the guard (kernel #192, #206; #414).
- Pixel 6 Pro: GPU scaling and cooling (kernel #189) and UFS suspend (kernel #188) merged.
- Pixel 9a: GPU levels merged through kernel #96; GNSS's moving-car session (#114) and the link driver (kernel #185).
- Pixel 7a: Bluetooth's device tree merged (kernel #98).
The Pixel 8 Pro's row is left to #472.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
… setting (derekross#185)

On the Pixel 7 Pro the lock glance showed a 24-hour time while the phone
bar and the home clock widget showed 12-hour. The bar's clockFormat in
~/.config/omarchy/shell.json is "ddd MMM d  h:mm AP". Two faults:

- The big glance time used the Qt format "h:mm". Qt counts "h" from 0
  to 23 unless the same format has an AM/PM marker, so even with the bar's
  format read, 2 pm showed as "14:02". It is now built from the hour
  (h % 12 || 12, with minutes) and still leaves AM/PM out. The small
  clock over the PIN view keeps "h:mm AP".
- shell.json was only read while the glance was active (path gated on
  the keypad toggle) and asynchronously. A failed read, such as Omarchy
  replacing the file, cleared the format, and the fallback was the
  session's Qt locale, which is C/POSIX for the shell and so 24-hour.
  It is now read at once (blockLoading, a small file), whatever the
  lock shows, again on every change and whenever the glance comes back.
  A read that fails or catches a half-written file keeps the last
  format.

The 12/24-hour rule stays the one the bar and the home clock use
(omamobile-shell HomeModel.systemTimeFormat): quoted literals ignored,
an AM/PM marker or "h" without "H" means 12-hour. Without a clockFormat
the lock now follows the bar's own default, HH:mm, so all three still
agree; it no longer falls back to the Qt locale. Patch 0023 is revised in
place, as derekross#181 did after derekross#176.

Tests (test/lock-glance, now under LC_ALL=C as the shell runs):
- the maintainer's format is 12-hour before the glance is active, with
  a 1-12 big time without AM/PM and a small clock with it;
- a half-written or missing shell.json keeps the last format;
- HH:mm and no clockFormat are 24-hour;
- the rule (twelveHour, quoted literals), glanceTime at 14:02, 00:05,
  12:30 and 9:41, and barClockFormat's parse.
The FileView stand-in now reads at once with blockLoading, as Quickshell
does. test/all and tools/pr-check pass, and the series applies with
--fuzz=0 to the real aarch64 Omarchy 4.0.6-1 (20 applied).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
The matrix re-read against what merged and ran on hardware since 2026-11-02:
- Pixel 7: Bluetooth and the torch move to testing (kernel derekross#196, derekross#197, derekross#426); fingerprint moves to WIP (kernel derekross#207; the package side, derekross#458, is in review); AVB footers and reboot=warm noted.
- Pixel 8a: a new row, from first light and UFS behind the guard (kernel derekross#192, derekross#206; derekross#414).
- Pixel 6 Pro: GPU scaling and cooling (kernel derekross#189) and UFS suspend (kernel derekross#188) merged.
- Pixel 9a: GPU levels merged through kernel derekross#96; GNSS's moving-car session (derekross#114) and the link driver (kernel derekross#185).
- Pixel 7a: Bluetooth's device tree merged (kernel derekross#98).
The Pixel 8 Pro's row is left to derekross#472.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant