refaktor
This commit is contained in:
@@ -2,6 +2,7 @@ pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import "../../../../config"
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
@@ -9,7 +10,6 @@ QtObject {
|
||||
property string status: "..."
|
||||
property bool running: false
|
||||
|
||||
// Timer property
|
||||
property Timer networkTimer: Timer {
|
||||
interval: 10000
|
||||
repeat: true
|
||||
@@ -17,15 +17,13 @@ QtObject {
|
||||
onTriggered: networkScript.running = true
|
||||
}
|
||||
|
||||
// Process property
|
||||
property Process networkScript: Process {
|
||||
running: true
|
||||
command: ["sh", "-c", Quickshell.env("HOME") + "/.config/quickshell/modules/bar/scripts/Network.sh"]
|
||||
command: ["sh", "-c", Config.configDir + "/modules/bar/scripts/Network.sh"]
|
||||
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
root.status = this.text.trim()
|
||||
// console.log("Network status:", root.status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user