[statusbar] feat: separate states for wifi down and no ssid
This commit is contained in:
parent
4540ec5578
commit
40a6eb6330
@ -13,7 +13,11 @@
|
||||
# Wifi quality percentage and icon if ethernet is connected.
|
||||
ssid="$(wpa_cli status | grep -i ^ssid | sed -e 's/.*=//')"
|
||||
state="$(wpa_cli status | grep -i ^wpa_state | sed -e 's/.*=//')"
|
||||
[ "COMPLETED" = $state ] && str="$(printf " %s" $ssid)" || str="$(printf " ---")"
|
||||
case "$state" in
|
||||
COMPLETED) str="$(printf " %s" $ssid)" ;;
|
||||
INTERFACE_DISABLED) str="WIFI DOWN" ;;
|
||||
*) str="$(printf "NO WIFI")";;
|
||||
esac
|
||||
eth="$(cat /sys/class/net/enp0s31f6/operstate)"
|
||||
if [ "up" = "$eth" ]; then
|
||||
str="$(printf "%s / " "$str")"
|
||||
|
Reference in New Issue
Block a user