mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Find SSID regardless of network manager
This commit is contained in:
parent
c3a54de181
commit
56067aef86
@ -66,11 +66,10 @@ func wifiInfo() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func wifiNameLinux() string {
|
func wifiNameLinux() string {
|
||||||
cmd := exec.Command("nmcli", "-t", "-f", "in-use,ssid", "dev", "wifi")
|
cmd := exec.Command("/usr/sbin/iwgetid", "-r")
|
||||||
out := utils.ExecuteCommand(cmd)
|
name := utils.ExecuteCommand(cmd)
|
||||||
name := utils.FindMatch(`\*:(.+)`, out)
|
|
||||||
if len(name) > 0 {
|
if len(name) > 0 {
|
||||||
return name[0][1]
|
return name
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user