summaryrefslogtreecommitdiff
path: root/.config/quickshell/Services/Wifi.qml
diff options
context:
space:
mode:
authorSam Nystrom <sam@samnystrom.dev>2026-01-15 20:27:18 -0500
committerSam Nystrom <sam@samnystrom.dev>2026-01-15 20:27:18 -0500
commit9a51a080b0d70e3f907c13014ea6d6911f48b09d (patch)
treeb0f335ba429248819ee9a04ea45c6e1f345987d0 /.config/quickshell/Services/Wifi.qml
parent53008538e5bef961e9ceb5abc5c5ee05a559e97d (diff)
update qs config
Diffstat (limited to '.config/quickshell/Services/Wifi.qml')
-rw-r--r--.config/quickshell/Services/Wifi.qml9
1 files changed, 5 insertions, 4 deletions
diff --git a/.config/quickshell/Services/Wifi.qml b/.config/quickshell/Services/Wifi.qml
index a438471..c8fd54b 100644
--- a/.config/quickshell/Services/Wifi.qml
+++ b/.config/quickshell/Services/Wifi.qml
@@ -1,7 +1,6 @@
pragma Singleton
import Quickshell
-import Quickshell.Hyprland
import Quickshell.Io
import QtQuick
@@ -11,12 +10,14 @@ Singleton {
Process {
id: netProc
- command: ["sh", "-c", "iwctl station wlan0 get-networks | awk -F' ' '/>/ {print $3}'"]
+ command: ["iwctl", "station", "wlan0", "get-networks"]
running: true
stdout: StdioCollector {
onStreamFinished: {
- root.ssid = this.text.trim()
- // Hyprland.refreshWorkspaces()
+ var line = this.text.split("\n").find(line => line.includes(">"))
+ // remove ANSI escape sequences
+ line = line.replace(/\x1b\[.*?[@A-Z\[\\\]^_`a-z\{\|\}~]/g, '')
+ root.ssid = line.split(" ").filter(x => x != "")[1]
}
}
}