Refactor calendar component

This commit is contained in:
2025-10-10 16:20:31 -03:00
parent dfe55f34af
commit 92a3907b8f
3 changed files with 138 additions and 21 deletions

View File

@@ -1,6 +1,5 @@
import QtQuick
import Quickshell.Widgets
import Quickshell.Io
import qs.Services
import qs.Common
import qs.Common.Styled
@@ -19,8 +18,6 @@ Item {
implicitWidth: clockText.implicitWidth * 1.6
implicitHeight: Theme.heightGaps
property string calendar: ""
StyledText {
id: clockText
@@ -28,22 +25,10 @@ Item {
text: Time.time
}
Process {
id: cal
running: true
command: ["cal", "-S3"]
stdout: StdioCollector {
onStreamFinished: {
clock.calendar = this.text;
}
}
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: {
cal.running = true;
PopUpHover.start(clock, "time");
}
onExited: {