From 9a51a080b0d70e3f907c13014ea6d6911f48b09d Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Thu, 15 Jan 2026 20:27:18 -0500 Subject: update qs config --- .config/quickshell/Services/Wifi.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to '.config/quickshell/Services/Wifi.qml') 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] } } } -- cgit v1.2.3