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
-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
}
}