reorganize repo: move shell sources into shell/, test scripts into test/

This commit is contained in:
Damocles 2026-04-17 18:29:40 +02:00
parent 344c1f8512
commit d6cd2f173a
60 changed files with 2 additions and 2 deletions

40
shell/modules/Weather.qml Normal file
View file

@ -0,0 +1,40 @@
import QtQuick
import Quickshell.Io
import "." as M
M.BarSection {
id: root
spacing: M.Theme.moduleSpacing
tooltip: root.weatherTooltip
property string weatherTooltip: ""
Process {
id: proc
running: true
command: ["wttrbar"].concat(M.Modules.weather.args)
stdout: StdioCollector {
onStreamFinished: {
try {
const data = JSON.parse(text);
label.icon = data.text ?? "";
root.weatherTooltip = data.tooltip ?? "";
} catch (e) {
label.icon = "";
root.weatherTooltip = "";
}
}
}
}
Timer {
interval: M.Modules.weather.interval || 3600000
running: true
repeat: true
onTriggered: proc.running = true
}
M.BarIcon {
id: label
anchors.verticalCenter: parent.verticalCenter
}
}