diff --git a/.config/i3pystatus/rfkill-wifi.py b/.config/i3pystatus/rfkill-wifi.py
index 29f9b63..b338d21 100755
--- a/.config/i3pystatus/rfkill-wifi.py
+++ b/.config/i3pystatus/rfkill-wifi.py
@@ -12,11 +12,20 @@ for line in check_output(['rfkill', '-rn']).decode('UTF-8').splitlines():
'hard': True if hard == 'blocked' else False,
}
-if devices['phy0']['hard']:
- wlan = '#FF0000'
-elif devices['phy0']['soft']:
- wlan = '#FF9900'
-else:
- wlan = '#00FF00'
+wifi_dev = None
+for device in devices:
+ if device.startswith('phy'):
+ wifi_dev = device
+ break
-print(f'WLAN')
+if not wifi_dev:
+ print('No WLAN?')
+else:
+ if devices[wifi_dev]['hard']:
+ wlan = '#FF0000'
+ elif devices[wifi_dev]['soft']:
+ wlan = '#FF9900'
+ else:
+ wlan = '#00FF00'
+
+ print(f'WLAN')