neodotfiles/user/.config/awesome/ui/custom-widgets/wifi

13 lines
378 B
Text
Raw Normal View History

2022-09-14 00:44:31 +00:00
#!/bin/bash
constate=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f3 | head -1)
currentwfi=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f4 | head -1)
if [ "$constate" = "disconnected" ]; then
2022-12-05 01:49:49 +00:00
echo "睊 "
2022-09-14 00:44:31 +00:00
elif [ "$constate" = "connected" ]; then
2022-12-05 01:49:49 +00:00
echo "直 $currentwfi"
2022-09-14 00:44:31 +00:00
else
2022-12-05 01:49:49 +00:00
notify-send " Airplane mode activated"
echo " "
2022-09-14 00:44:31 +00:00
fi