Drop the daytime widget, use clock everywhere

Clock and daytime were near-duplicates with different click semantics
(clock toggles between formats on left-click and opens the timezone
selector on right-click; daytime was non-pressable with a hover tooltip).
Standardize on clock, since it's the more capable of the two.

- Delete widgets/daytime.qml and its FirstPartyWidgets entry.
- Migrate shell-defaults.json, shell.qml's builtin fallback, Bar.qml's
  fallback bar config, and the settings panel's builtin defaults so the
  center anchor and center-section entry both reference "clock".
- Rename the daytimeSettings form to clockSettings and rephrase
  "Tooltip format" → "Alternate format (click to toggle)" so the field
  label matches clock's actual behavior.
- Update the gallery dropdown options and bar/README docs.
This commit is contained in:
David Heinemeier Hansson
2026-05-20 21:23:30 +02:00
parent 9732279832
commit 6090d46dfd
9 changed files with 31 additions and 77 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ Item {
property var fallbackBarConfig: ({
position: "top",
transparent: false,
centerAnchor: "daytime",
centerAnchor: "clock",
layout: { left: [], center: [], right: [] }
})
property var layoutConfig: fallbackBarConfig.layout
+1 -2
View File
@@ -14,8 +14,7 @@ QtObject {
"networkPanel": { displayName: "Network", description: "Wi-Fi list and connection state", category: "Network", allowMultiple: false, sourceDir: "../panels", sourceName: "Network" },
"powerPanel": { displayName: "Power", description: "Battery, power profile, and system stats", category: "System", allowMultiple: false, sourceDir: "../panels", sourceName: "Power" },
"bluetoothPanel": { displayName: "Bluetooth", description: "Bluetooth device list with connect/disconnect", category: "Network", allowMultiple: false, sourceDir: "../panels", sourceName: "Bluetooth" },
"clock": { displayName: "Clock", description: "Date / time text", category: "Time", allowMultiple: false },
"daytime": { displayName: "Daytime", description: "Day/time label with date tooltip", category: "Time", allowMultiple: false, settingsForm: "daytimeSettings" },
"clock": { displayName: "Clock", description: "Day/time label; click to toggle alternate format", category: "Time", allowMultiple: false, settingsForm: "clockSettings" },
"indicators": { displayName: "Indicators", description: "Manual state indicators", category: "Status", allowMultiple: false },
"notificationCenter": { displayName: "Notification center", description: "Recent notifications + DND", category: "Status", allowMultiple: false },
"systemUpdate": { displayName: "System update", description: "Indicates available system updates", category: "System", allowMultiple: false },
+3 -4
View File
@@ -16,7 +16,7 @@ the shell for its whole session.
The bar config lives under the `bar:` key of [`~/.config/omarchy/shell.json`](../../README.md#shelljson-shape). Out of the box the shell uses [`shell-defaults.json`](../../shell-defaults.json). Once you customize anything via `omarchy launch bar settings` or by editing shell.json directly, your file is canonical — there is no deep-merge.
Launch the visual editor with `omarchy launch bar settings` (or run `omarchy-launch-bar-settings`) to reorder widgets, add/remove them, and tweak per-widget options without editing JSON by hand. You can also right-click empty space to the left or right of the centered daytime module to open it; double-left-click the same empty space to toggle bar transparency.
Launch the visual editor with `omarchy launch bar settings` (or run `omarchy-launch-bar-settings`) to reorder widgets, add/remove them, and tweak per-widget options without editing JSON by hand. You can also right-click empty space to the left or right of the centered clock module to open it; double-left-click the same empty space to toggle bar transparency.
Example `shell.json` (bar subtree only shown):
@@ -26,7 +26,7 @@ Example `shell.json` (bar subtree only shown):
"bar": {
"position": "top",
"transparent": false,
"centerAnchor": "daytime",
"centerAnchor": "clock",
"layout": {
"left": [
{ "id": "omarchy" },
@@ -35,7 +35,7 @@ Example `shell.json` (bar subtree only shown):
],
"center": [
{ "id": "media" },
{ "id": "daytime", "format": "HH:mm" }
{ "id": "clock", "format": "HH:mm" }
],
"right": [
{ "id": "audioPanel" },
@@ -58,7 +58,6 @@ Example `shell.json` (bar subtree only shown):
| `workspaces` | Hyprland workspace switcher | left = focus workspace |
| `clock` | Date/time label | left = alternate format · right = timezone selector |
| `media` | MPRIS now-playing — scrolling track + artist, cover-art popup | left = play/pause · middle = next · scroll = prev/next · right = popup |
| `daytime` | Day/time label with date tooltip | hover = date |
| `indicators` | Manual state indicators | left = indicator action |
| `notificationCenter` | Bell with badge + popup with recent notifications, DND toggle | left = popup · right = toggle DND |
| `systemUpdate` | Available update indicator | left = update |
-43
View File
@@ -1,43 +0,0 @@
import QtQuick
import Quickshell
import qs.Commons
import qs.Ui
BarWidget {
id: root
moduleName: "daytime"
property date now: new Date()
function formatLabel() {
if (!bar) return ""
var fmt = bar.vertical
? String(setting("verticalFormat", "HH\n—\nmm"))
: String(setting("format", "dddd HH:mm"))
return Qt.formatDateTime(now, fmt)
}
function tooltipLabel() {
return Qt.formatDateTime(root.now, String(setting("formatAlt", "dd MMMM yyyy")))
}
implicitWidth: button.implicitWidth
implicitHeight: button.implicitHeight
SystemClock {
id: clockTimer
precision: SystemClock.Minutes
onDateChanged: root.now = clockTimer.date
}
WidgetButton {
id: button
anchors.fill: parent
bar: root.bar
text: root.formatLabel()
horizontalMargin: 8.75
verticalPadding: 8.75
tooltipText: root.tooltipLabel()
pressable: false
}
}