Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

World Clock — Omarchy bar widget

A plain HH:mm clock for the Omarchy bar — no ticking seconds cluttering the bar. Click it for the current time enlarged with seconds, plus a world-clock list: Prague, Bangkok, Sydney, New York, Los Angeles — each showing its offset from Prague, live local time, and date.

World Clock popup preview

Why

The built-in omarchy.clock widget is one combined date+time display with no way to see other timezones at a glance. This is a separate, focused widget for exactly that — pairs naturally with a date-only clock widget sitting next to it, but works fine on its own too.

Install

omarchy plugin clone io.github.janfai.worldclock
omarchy plugin enable io.github.janfai.worldclock
omarchy bar put io.github.janfai.worldclock
omarchy-restart-shell

(omarchy-restart-shell, not omarchy-refresh-shell — the latter resets your whole bar layout to Omarchy's defaults.)

Usage

  • Left click the bar label to open the popup.
  • The popup shows today's time large with seconds, then one row per zone: zone name, its offset from Prague (+5h, -9h, etc.; Prague's own row reads +0h), live HH:mm:ss, and date.
  • Everything ticks live while the popup is open (once a second); the bar label itself updates once a minute.

Configuration

None yet — the zone list (Prague, Bangkok, Sydney, New York, Los Angeles) is currently fixed in Panel.qml's zones property and worldclock-offsets.py's ZONES dict. To use a different set of cities, edit both to the same IANA timezone names and matching ids.

How it works

  • worldclock-offsets.py prints each zone's current UTC offset (in minutes) as JSON, using Python's stdlib zoneinfo — correct across DST transitions automatically. Polled every 5 minutes (offsets only change a couple of times a year, not every tick).
  • Each zone's live clock is computed client-side in QML, not by re-running the script every second: Date.now() is a UTC epoch (timezone-agnostic) — add the zone's offset in minutes, then read the result back with the Date object's UTC getters (getUTCHours(), getUTCMinutes(), etc. — not getHours()), hand-formatted. (An earlier version tried Qt.formatDateTime(date, format, Qt.UTC) for this — that overload doesn't exist in QML and threw a TypeError on every evaluation, silently leaving the widget blank. Worth knowing if you're tempted to reach for it too.)
  • The widget's own directory is resolved from the QML file's own base URL (Qt.resolvedUrl(".")), not hardcoded, so it works from any install path/username.

Remove

omarchy plugin disable io.github.janfai.worldclock
rm -rf ~/.config/omarchy/plugins/worldclock

(adjust the folder name if you cloned it somewhere else) and remove its entry from ~/.config/omarchy/shell.json's bar.layout, then omarchy-restart-shell.

License

MIT — see LICENSE.

About

Omarchy bar widget: plain HH:mm, click for a Prague/Bangkok/Sydney/New York/LA world clock

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages