neodotfiles/user/.config/awesome/ui/custom-widgets/wifi
2022-12-04 21:49:49 -04:00

12 lines
378 B
Bash
Executable file

#!/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
echo "睊 "
elif [ "$constate" = "connected" ]; then
echo "$currentwfi"
else
notify-send " Airplane mode activated"
echo " "
fi