add switching random wallpaper every 60 seconds and base for matugen

This commit is contained in:
Sem
2026-03-29 22:36:31 +02:00
parent 53bdb29c8c
commit 06477003e0
4 changed files with 88 additions and 32 deletions

View File

@@ -5,6 +5,8 @@ import Quickshell.Io
import QtQuick
import QtQuick.Layouts
import "."
// qmllint disable uncreatable-type
PanelWindow {
id: root
@@ -18,6 +20,8 @@ PanelWindow {
property var lastCpuIdle: 0
property var lastCpuTotal: 0
RandomWallpaper {}
Process {
id: cpuProc
// get cpu usage, first line of /proc/stat
@@ -25,7 +29,6 @@ PanelWindow {
stdout: StdioCollector {
onStreamFinished: {
var line = this.text.split(/\r?\n/)[1].split(" ");
console.log("the line is " + line);
var user = parseInt(line[1]);
var nice = parseInt(line[2]);
@@ -45,8 +48,6 @@ PanelWindow {
root.cpuUsage = Math.round(100 * (1 - diffIdle / diffTotal));
}
console.log("diffTotal is " + diffTotal);
root.lastCpuIdle = idleAll;
root.lastCpuTotal = total;
}