feat: add statsDaemon.interval setting, pass --interval to nova-stats

This commit is contained in:
Damocles 2026-04-15 19:01:29 +02:00
parent c8d71bd871
commit 937ae5af2e
4 changed files with 35 additions and 3 deletions

View file

@ -89,6 +89,9 @@ QtObject {
property var overviewBackdrop: ({
enable: true
})
property var statsDaemon: ({
interval: -1
})
property FileView _file: FileView {
path: (Quickshell.env("XDG_CONFIG_HOME") || (Quickshell.env("HOME") + "/.config")) + "/nova-shell/modules.json"

View file

@ -29,7 +29,10 @@ QtObject {
// nova-stats stream (cpu + mem)
property var _statsProc: Process {
running: true
command: ["nova-stats"]
command: {
const ms = M.Modules.statsDaemon.interval;
return ms > 0 ? ["nova-stats", "--interval", ms.toString()] : ["nova-stats"];
}
stdout: SplitParser {
splitMarker: "\n"
onRead: line => {