Files
glassMxrph/quickshell/bar/modules/ClockModule.qml
T
mxandClaude Opus 5.5 99e64a7713 Add glassMxrph shell sources
Initial commit of the Quickshell desktop suite: bar, dock, launcher,
settings, Control Center, dashboard, OSD, lock screen, desktop widgets,
plugin host with the vendored Noctalia/Omarchy compatibility layer,
helpers, packaging, tests and phase documentation.

Includes the optimization work so far: usage widgets and dashboard
gauges no longer animate continuously, desktop widgets pause while
covered, system controls stop flickering on background polls, dock app
matching uses an indexed catalog, and workspace ghosts are created only
for occupied slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:36:17 +02:00

32 lines
1.1 KiB
QML

import QtQuick
import Quickshell
import "../../components"
import "../../theme"
import "../../services"
import "../../core"
GlassPill {
id: root
readonly property var options: ConfigService.data.bar.clock
width: label.implicitWidth + 30
height: ModuleRegistry.pillHeight
SystemClock {
id: clock
precision: root.options.showSeconds ? SystemClock.Seconds : SystemClock.Minutes
}
Text {
id: label
anchors.centerIn: parent
text: Qt.formatDateTime(clock.date, (root.options.showDate ? "ddd, d MMM " : "") + (root.options.use24Hour ? "HH:mm" : "h:mm") + (root.options.showSeconds ? ":ss" : "") + (root.options.use24Hour ? "" : " AP"))
color: Theme.text
font.pixelSize: 13
}
// Clicking the clock opens the dashboard (Settings → Dashboard).
MouseArea {
anchors.fill: parent
enabled: ConfigService.ready && ConfigService.data.dashboard.enabled && ConfigService.data.dashboard.openFromClock
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: ShellState.toggleDashboard("")
}
}