diff --git a/shell/README.md b/shell/README.md index 981958ed..f50899e9 100644 --- a/shell/README.md +++ b/shell/README.md @@ -168,10 +168,10 @@ rewrites the `bar` subtree from the current `shell-defaults.json`. "bar": { "position": "top", "transparent": false, - "centerAnchor": "daytime", + "centerAnchor": "clock", "layout": { "left": [ { "id": "omarchy" }, { "id": "workspaces" } ], - "center": [ { "id": "daytime", "format": "HH:mm" } ], + "center": [ { "id": "clock", "format": "HH:mm" } ], "right": [ { "id": "audioPanel" } ] @@ -194,8 +194,8 @@ rewrites the `bar` subtree from the current `shell-defaults.json`. settings UI adds/removes layout entries; other plugin kinds are enabled with the shell IPC. First-party plugins are always enabled. 4. **Multiple instances** are allowed when a manifest sets - `allowMultiple: true`. Each instance is independent — e.g. two daytime - widgets in different timezones are just two `{"id":"daytime", "timezone": ...}` + `allowMultiple: true`. Each instance is independent — e.g. two clock + widgets in different timezones are just two `{"id":"clock", "timezone": ...}` entries with their own values. 5. **Idle timings are top-level.** `idle.screensaver` and `idle.lock` are seconds since user idle began, so the default lock fires at 300s diff --git a/shell/plugins/bar/Bar.qml b/shell/plugins/bar/Bar.qml index 426d5ad8..437cb608 100644 --- a/shell/plugins/bar/Bar.qml +++ b/shell/plugins/bar/Bar.qml @@ -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 diff --git a/shell/plugins/bar/FirstPartyWidgets.qml b/shell/plugins/bar/FirstPartyWidgets.qml index 164d0e60..8c8bc050 100644 --- a/shell/plugins/bar/FirstPartyWidgets.qml +++ b/shell/plugins/bar/FirstPartyWidgets.qml @@ -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 }, diff --git a/shell/plugins/bar/README.md b/shell/plugins/bar/README.md index 155aab56..3155cb1c 100644 --- a/shell/plugins/bar/README.md +++ b/shell/plugins/bar/README.md @@ -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 | diff --git a/shell/plugins/bar/widgets/daytime.qml b/shell/plugins/bar/widgets/daytime.qml deleted file mode 100644 index ec368e8c..00000000 --- a/shell/plugins/bar/widgets/daytime.qml +++ /dev/null @@ -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 - } -} diff --git a/shell/plugins/dev-gallery/GalleryPanel.qml b/shell/plugins/dev-gallery/GalleryPanel.qml index c7ddb4cc..7da1c8e2 100644 --- a/shell/plugins/dev-gallery/GalleryPanel.qml +++ b/shell/plugins/dev-gallery/GalleryPanel.qml @@ -105,7 +105,7 @@ Item { property string choiceDemoValue: "top" property bool toggleDemoOn: true property bool toggleSquareOn: false - property string dropdownDemoValue: "daytime" + property string dropdownDemoValue: "clock" property string searchableDemoValue: "" property int numberDemoValue: 15 @@ -1523,7 +1523,7 @@ Item { width: Style.spacing.dropdownWidth label: "Center anchor" fontFamily: root.fontFamily - options: ["daytime", "weather", "clock", "powerPanel"] + options: ["clock", "weather", "powerPanel"] value: root.dropdownDemoValue hasCursor: root.focusSection === "dropdown" && root.selectedIndex === 0 onHovered: function(h) { @@ -1593,7 +1593,6 @@ Item { { value: "network", label: "Network", description: "Wi-Fi + ethernet status" }, { value: "bluetooth", label: "Bluetooth", description: "Paired and nearby devices" }, { value: "monitor", label: "Monitor", description: "Brightness + scale" }, - { value: "daytime", label: "Daytime", description: "Day/time label" }, { value: "media", label: "Media", description: "Now-playing + transport" }, { value: "workspaces", label: "Workspaces", description: "Hyprland workspace pills" }, { value: "system-tray", label: "System tray", description: "StatusNotifierItem icons" }, diff --git a/shell/plugins/settings/SettingsPanel.qml b/shell/plugins/settings/SettingsPanel.qml index 86db77e2..82545dc5 100644 --- a/shell/plugins/settings/SettingsPanel.qml +++ b/shell/plugins/settings/SettingsPanel.qml @@ -128,11 +128,11 @@ Item { bar: { position: "top", transparent: false, - centerAnchor: "daytime", + centerAnchor: "clock", layout: { left: [{ id: "omarchy" }, { id: "workspaces" }], center: [ - { id: "daytime", format: "dddd HH:mm", formatAlt: "dd MMMM yyyy", verticalFormat: "HH\n\u2014\nmm" }, + { id: "clock", format: "dddd HH:mm", formatAlt: "dd MMMM yyyy", verticalFormat: "HH\n\u2014\nmm" }, { id: "weather" }, { id: "indicators", items: [ "dnd", "nightlight", "stayAwake", "screenrecording", "dictation" ] }, { id: "systemUpdate" } ], right: [ @@ -145,7 +145,7 @@ Item { }) property var defaultConfig: builtinShellConfig - property var draft: ({ version: 1, bar: { position: "top", transparent: false, centerAnchor: "daytime", layout: { left: [], center: [], right: [] } }, plugins: [] }) + property var draft: ({ version: 1, bar: { position: "top", transparent: false, centerAnchor: "clock", layout: { left: [], center: [], right: [] } }, plugins: [] }) property int draftRevision: 0 property bool suppressReload: false @@ -1124,7 +1124,7 @@ Item { if (meta && meta.settingsForm) { switch (meta.settingsForm) { case "spacerSettings": return spacerSettingsComponent - case "daytimeSettings": return daytimeSettingsComponent + case "clockSettings": return clockSettingsComponent case "weatherSettings": return weatherSettingsComponent } } @@ -1166,24 +1166,24 @@ Item { } Component { - id: daytimeSettingsComponent + id: clockSettingsComponent Column { - id: calForm + id: clockForm signal fieldChanged(string key, var value) property var entry: ({}) spacing: Style.spacing.rowGap width: parent ? parent.width : 0 - component DaytimeField: TextField { + component ClockField: TextField { property string fieldKey: "" width: parent.width foreground: root.foreground accent: root.accent font.family: root.fontFamily font.pixelSize: Style.font.body - onEditingFinished: if (fieldKey) calForm.fieldChanged(fieldKey, text) + onEditingFinished: if (fieldKey) clockForm.fieldChanged(fieldKey, text) } Text { @@ -1192,20 +1192,20 @@ Item { font.family: root.fontFamily font.pixelSize: Style.font.bodySmall } - DaytimeField { + ClockField { fieldKey: "format" - text: calForm.entry.format || "dddd HH:mm" + text: clockForm.entry.format || "dddd HH:mm" } Text { - text: "Tooltip format" + text: "Alternate format (click to toggle)" color: Qt.darker(root.foreground, 1.4) font.family: root.fontFamily font.pixelSize: Style.font.bodySmall } - DaytimeField { + ClockField { fieldKey: "formatAlt" - text: calForm.entry.formatAlt || "dd MMMM yyyy" + text: clockForm.entry.formatAlt || "dd MMMM yyyy" } Text { @@ -1214,9 +1214,9 @@ Item { font.family: root.fontFamily font.pixelSize: Style.font.bodySmall } - DaytimeField { + ClockField { fieldKey: "verticalFormat" - text: calForm.entry.verticalFormat || "HH\n—\nmm" + text: clockForm.entry.verticalFormat || "HH\n—\nmm" } } } diff --git a/shell/shell-defaults.json b/shell/shell-defaults.json index 3fe40160..c7546863 100644 --- a/shell/shell-defaults.json +++ b/shell/shell-defaults.json @@ -7,7 +7,7 @@ "bar": { "position": "top", "transparent": false, - "centerAnchor": "daytime", + "centerAnchor": "clock", "layout": { "left": [ { @@ -19,7 +19,7 @@ ], "center": [ { - "id": "daytime", + "id": "clock", "format": "dddd HH:mm", "formatAlt": "dd MMMM yyyy", "verticalFormat": "HH\n\u2014\nmm" diff --git a/shell/shell.qml b/shell/shell.qml index cf01d683..ab27c2e9 100644 --- a/shell/shell.qml +++ b/shell/shell.qml @@ -44,10 +44,10 @@ ShellRoot { bar: { position: "top", transparent: false, - centerAnchor: "daytime", + centerAnchor: "clock", layout: { left: [{ id: "omarchy" }, { id: "workspaces" }], - center: [{ id: "daytime", format: "dddd HH:mm" }], + center: [{ id: "clock", format: "dddd HH:mm" }], right: [{ id: "audioPanel" }] } }, @@ -491,7 +491,7 @@ ShellRoot { // Mirror plugin registry state into BarWidgetRegistry whenever it changes. // Each enabled plugin with kind "bar-widget" gets a Component created from // its manifest entry point and registered under its plain manifest id. - // First-party widget ids (daytime, weather, etc.) are short and don't + // First-party widget ids (clock, weather, etc.) are short and don't // collide with namespaced plugin ids, so we don't need a separate // "plugin:" namespace anymore. Connections {