bar/modules/Moonphase.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 |
// Moonphase.qml
import QtQuick
import Quickshell
import Quickshell.Io
import QtQuick.Layouts
import "../../"
import "../classes" as Class
Class.RightRowLayout {
Class.TopbarText {
id: moonphase
color: Resources.palette.saffron
font.pixelSize: Resources.fontsize.moonphase
Process {
id: moonphase_script
command: ["bar/scripts/moon.sh"]
workingDirectory: Quickshell.shellDir
running: true
stdout: StdioCollector {
onStreamFinished: moonphase.text = this.text.trim()
}
}
Timer {
interval: 10000
running: true
repeat: true
onTriggered: moonphase_script.running = true
}
}
Class.TopSep {}
}
|