Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/sh
|
|
|
|
source ~/.config.env
|
|
|
|
is_eth_used=$(cat /sys/class/net/${ETH_IT}/carrier)
|
|
is_wlan_used=$(cat /sys/class/net/${WLAN_IT}/carrier)
|
|
|
|
echo -n "^c#88c0d0^"
|
|
|
|
if [ "$is_eth_used" -eq 1 ]; then # wired network is carrying
|
|
icon=" ^d^ " #uF6FF
|
|
elif [ "$is_wlan_used" -eq 1 ]; then # wireless network is carrying
|
|
icon="直 ^d^ $(nmcli -t -f active,ssid dev wifi | egrep '^yes' | cut -d\' -f2 | cut -d ':' -f2)" #uF1EB
|
|
else
|
|
icon=" ^d^" #uf128 # no network
|
|
fi
|
|
|
|
echo -n $icon
|