change colors

This commit is contained in:
mintycube 2024-05-16 21:30:18 +05:00
parent 229deda371
commit 4a63eb13ef

View File

@ -22,13 +22,13 @@ if [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'up' ] ; then
if [ ! -e ~/.cache/bar_color ]; then
wifiicon="$(awk '/^\s*w/ { cmd="nmcli -t -f active,ssid dev wifi | grep yes | cut -d: -f2"; cmd | getline output; close(cmd); print "󰤪 ", output }' /proc/net/wireless)"
else
wifiicon="$(awk '/^\s*w/ { cmd="nmcli -t -f active,ssid dev wifi | grep yes | cut -d: -f2"; cmd | getline output; close(cmd); print "^C2^󰤪 ^d^", output }' /proc/net/wireless)"
wifiicon="$(awk '/^\s*w/ { cmd="nmcli -t -f active,ssid dev wifi | grep yes | cut -d: -f2"; cmd | getline output; close(cmd); print "^C3^󰤪 ^d^", output }' /proc/net/wireless)"
fi
elif [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ] ; then
if [ ! -e ~/.cache/bar_color ]; then
[ "$(cat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon="󰤭 " || wifiicon="󰇨 "
else
[ "$(cat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon="^C1^󰤭 ^d^" || wifiicon="^C3^󰇨 ^d^"
[ "$(cat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon="^C5^󰤭 ^d^" || wifiicon="^C1^󰇨 ^d^"
fi
fi