add clock
This commit is contained in:
parent
9e97d6c2e3
commit
a8e194a911
@ -41,6 +41,7 @@ Variants {
|
||||
spacing: 10
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Clock {}
|
||||
Volume {}
|
||||
Battery {}
|
||||
}
|
||||
|
||||
19
modules/Bar/Clock.qml
Normal file
19
modules/Bar/Clock.qml
Normal file
@ -0,0 +1,19 @@
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import "../../reusables/"
|
||||
import "../../settings/"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
implicitWidth: clockText.implicitWidth
|
||||
implicitHeight: Settings.config.barHeight
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.Minutes
|
||||
}
|
||||
CustomText {
|
||||
id: clockText
|
||||
anchors.centerIn: parent
|
||||
text: Qt.formatDateTime(clock.date, "hh:mm")
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user