bar/modules/Sunset.qml (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
// Timedate.qml
import QtQuick
import Quickshell
import Quickshell.Io
import QtQuick.Layouts
import "../../"
import "../classes" as Class
// import "../scripts/suntime.sh" as Sunset
RowLayout {
spacing: 2
layoutDirection: Qt.RightToLeft
Class.TopbarText {
id: sunset
color: Resources.palette.scarlet
Process {
id: sunset_script
command: ["sh","suntime.sh"]
running: true
stdout: StdioCollector {
// onStreamFinished: sunset.text = this.text
onStreamFinished: sunset.text = this.text
}
}
Timer {
interval: 1000
running: true
repeat: true
onTriggered: sunset_script.running = true
}
}
Class.TopbarIcon {
text: Resources.icons.sunset
color: Resources.palette.scarlet
}
Class.TopSep {
}
}
|