fixes waybar, adds quickshell
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
// modules/ClockWidget.qml - " HH:MM DD Mon" (matches waybar clock format)
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Io
|
||||
import ".."
|
||||
|
||||
Pill {
|
||||
onClicked: (m) => {
|
||||
if (m.button === Qt.LeftButton)
|
||||
Exec.run(["kitty", "-e", "calcure", "--class=float", "-T", "calcure"])
|
||||
}
|
||||
|
||||
Text {
|
||||
text: " " + Qt.formatDateTime(clock.now, "HH:mm") +
|
||||
" " + Qt.formatDateTime(clock.now, "d MMM")
|
||||
font { family: Theme.fontSans; pixelSize: Theme.fontSize }
|
||||
color: Theme.foreground
|
||||
}
|
||||
|
||||
// Update every 10 s (no need for per-second ticks)
|
||||
QtObject {
|
||||
id: clock
|
||||
property var now: new Date()
|
||||
property var timer: Timer {
|
||||
interval: 10000; running: true; repeat: true
|
||||
triggeredOnStart: true
|
||||
onTriggered: clock.now = new Date()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user