nova-shell/shell/modules/ClockModule.qml

34 lines
876 B
QML

import QtQuick
import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
active: NS.ModulesService.clockEnable
spacing: NS.ThemeService.moduleSpacing
tooltip: Qt.formatDateTime(clock.date, "dddd, dd. MMMM yyyy HH:mm:ss")
panelNamespace: "nova-clock"
panelContentWidth: 220
panelComponent: Component {
C.ClockApplet {
width: parent.width
accentColor: root.accentColor
currentDate: clock.date
}
}
SystemClock {
id: clock
precision: SystemClock.Seconds
}
M.BarLabel {
font.pixelSize: NS.ThemeService.fontSize + 1
label: Qt.formatDateTime(clock.date, "ddd, dd. MMM HH:mm")
minText: "Wed, 00. Sep 00:00"
anchors.verticalCenter: parent.verticalCenter
}
}