50 lines
1.2 KiB
QML
50 lines
1.2 KiB
QML
import Quickshell
|
|
import Quickshell.Io
|
|
import QtQuick
|
|
|
|
Scope {
|
|
id: base
|
|
|
|
property var walColors: ({
|
|
special: { background: "#1d160d", foreground: "#d8d8d3" },
|
|
colors: {
|
|
color0: "#1d160d", color1: "#946F50", color2: "#BA9351",
|
|
color3: "#A28E62", color4: "#6E7986", color5: "#76878C",
|
|
color6: "#9FA4A4", color7: "#d8d8d3", color8: "#979793"
|
|
}
|
|
})
|
|
|
|
property string motd: ""
|
|
property string fontFamily: "HurmitNerdFontPropo"
|
|
|
|
property SystemStats stats: SystemStats {}
|
|
|
|
Process {
|
|
id: colorsProc
|
|
command: ["cat", "/home/candle/.cache/wal/colors.json"]
|
|
running: true
|
|
|
|
stdout: StdioCollector {
|
|
onDataChanged: {
|
|
try {
|
|
let parsed = JSON.parse(text)
|
|
if (parsed && parsed.special)
|
|
base.walColors = parsed
|
|
} catch(e) {}
|
|
}
|
|
}
|
|
}
|
|
|
|
Process {
|
|
id: motdProc
|
|
command: ["cat", "/home/candle/.MOTD"]
|
|
running: true
|
|
|
|
stdout: StdioCollector {
|
|
onDataChanged: {
|
|
base.motd = text.trim()
|
|
}
|
|
}
|
|
}
|
|
}
|