forked from kunsi/dotfiles
16 lines
270 B
Python
16 lines
270 B
Python
|
#!/usr/bin/python
|
||
|
|
||
|
import pyric.utils.rfkill as rfkill
|
||
|
import sys
|
||
|
|
||
|
devices = rfkill.rfkill_list()
|
||
|
|
||
|
if devices['phy0']['hard']:
|
||
|
wlan = '#FF0000'
|
||
|
elif devices['phy0']['soft']:
|
||
|
wlan = '#FF9900'
|
||
|
else:
|
||
|
wlan = '#00FF00'
|
||
|
|
||
|
print(f'<span color="{wlan}">WLAN</span>')
|