WLAN Verbindung angepasst
This commit is contained in:
@@ -222,6 +222,13 @@ def get_wifi_status():
|
||||
device, state, connection = parts
|
||||
if device == 'wlan0':
|
||||
if state == 'connected':
|
||||
ssid_stdout, _, ssid_returncode = run_command(['nmcli', '-t', '-f', 'ACTIVE,SSID', 'device', 'wifi', 'list', 'ifname', 'wlan0'])
|
||||
if ssid_returncode == 0 and ssid_stdout:
|
||||
for ssid_line in ssid_stdout.splitlines():
|
||||
if ssid_line.startswith('yes:'):
|
||||
active_ssid = ssid_line.split(':', 1)[1].strip()
|
||||
if active_ssid:
|
||||
return f'verbunden: {active_ssid}'
|
||||
return f'verbunden: {connection}'
|
||||
return state
|
||||
|
||||
|
||||
Reference in New Issue
Block a user