blob: a438471839e76068aa22f95bec3b838b0caa4cc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
pragma Singleton
import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
import QtQuick
Singleton {
id: root
property string ssid
Process {
id: netProc
command: ["sh", "-c", "iwctl station wlan0 get-networks | awk -F' ' '/>/ {print $3}'"]
running: true
stdout: StdioCollector {
onStreamFinished: {
root.ssid = this.text.trim()
// Hyprland.refreshWorkspaces()
}
}
}
Timer {
interval: 5000
running: true
repeat: true
onTriggered: netProc.running = true
}
}
|