diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2025-12-08 16:58:52 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2025-12-08 16:58:52 +0530 |
| commit | af844bbc44741a971614175248cc29505d1acbd1 (patch) | |
| tree | d75c8dc30e7f0f0596b5f087ad3697678a042e3e /quickshell/items/Spin.qml | |
| parent | 15bed9293ad7fb0b54cef68cdbf1a0549ec7aa97 (diff) | |
replaced wofi with custom app menu + right side apps bar + organization of qml files
Diffstat (limited to 'quickshell/items/Spin.qml')
| -rw-r--r-- | quickshell/items/Spin.qml | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/quickshell/items/Spin.qml b/quickshell/items/Spin.qml new file mode 100644 index 0000000..72e6105 --- /dev/null +++ b/quickshell/items/Spin.qml @@ -0,0 +1,45 @@ +import QtQuick +import QtQuick.Layouts + +RowLayout { + spacing: 0 + Text { + text: " Spin:" + color: shellRoot.white + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + } + } + Text { + property var formatMode: "HH:mm:ss" + + id: clock + text: Qt.formatDateTime(new Date(), clock.formatMode) + color: shellRoot.purple + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + bold: true + } + + Timer { + interval: 1000 + running: true + repeat: true + onTriggered: clock.text = Qt.formatDateTime(new Date(), clock.formatMode) + } + + MouseArea { + anchors.fill: parent + onClicked: { + if (clock.formatMode === "HH:mm:ss") { + clock.formatMode = "yyyy/MM/dd, dddd" + } else { + clock.formatMode = "HH:mm:ss" + } + clock.text = Qt.formatDateTime(new Date(), clock.formatMode) + } + } + } +} |
