mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 16:08:52 +01:00
iwconfig needs sudo to exec
This commit is contained in:
parent
61a10f25f8
commit
d7ce515e62
@ -217,7 +217,7 @@ func (self *TitleBar) UpdateWifiStrength() {
|
||||
|
||||
func (t *TitleBar) GetWifiStrength() int {
|
||||
qua := 0
|
||||
cli := fmt.Sprintf("iwconfig %s | grep Signal | /usr/bin/awk '{print $4}' | /usr/bin/cut -d'=' -f2", sysgo.WifiDev)
|
||||
cli := fmt.Sprintf("sudo iwconfig %s | grep Signal | /usr/bin/awk '{print $4}' | /usr/bin/cut -d'=' -f2", sysgo.WifiDev)
|
||||
out := System(cli)
|
||||
if len(out) > 2 {
|
||||
if strings.Contains(out, "No") == false {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user