This commit is contained in:
Hannes
2026-06-14 00:49:24 +02:00
parent 5c91cec113
commit 6ab83915a1
35 changed files with 550 additions and 486 deletions
+6 -30
View File
@@ -1,23 +1,19 @@
import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
import "../../../colors"
import "../../../config"
import "../states/Network" as Global
import "../states/Network"
MouseArea {
id: networkButton
width: Math.max(networkText.width + Config.spacing*2, bar.height)
width: Math.max(networkText.width + Config.spacing_fun(height)*2, height)
height: bar.height
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
Global.NetworkState.networkScript.running = true
// networkStatus.running = true
console.log("[Network] Refreshing... current status: " + NetworkState.status)
NetworkState.networkScript.running = true
}
Rectangle {
@@ -30,31 +26,11 @@ MouseArea {
Text {
id: networkText
text: Global.NetworkState.status
text: NetworkState.status
anchors.centerIn: parent
font.pixelSize: Config.big_font_size(bar.height)
font.pixelSize: Config.iconSize(bar.height)
font.family: Config.font
color: networkButton.containsMouse ? Colors.tertiary_fg : networkText.text === "󰤭 /󱐤" ? Colors.error : Colors.primary
}
// Process {
// id: networkStatus
// command: ["sh", "-c", Quickshell.env("HOME") + "/.config/quickshell/modules/bar/scripts/Network.sh"]
// running: true
// stdout: StdioCollector {
// onStreamFinished: {
// networkText.text = this.text.trim()
// // console.log("networkScript networkText:", this.text.trim())
// }
// }
// }
// Timer {
// interval: 10000
// running: true
// repeat: true
// onTriggered: networkStatus.running = true
// }
}
}