Add matugen config for quickshell and add futures box

This commit is contained in:
Sem
2026-04-02 22:52:23 +02:00
parent e72f9e50f6
commit 587b636e2f
7 changed files with 351 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
import QtQuick
import Quickshell.Io
Item {
id: fortuneService
property string fortuneText: "Loading..."
Process {
id: fortuneProcess
command: ["fortune"]
stdout: StdioCollector {
onStreamFinished: {
fortuneService.fortuneText = this.text.trim();
}
}
}
Component.onCompleted: {
fortuneProcess.running = true;
}
Timer {
interval: 60000 // update fortune every minute
repeat: true
running: true
onTriggered: {
fortuneProcess.running = true; // run the process again to get a new fortune
}
}
}