Update sb-internet

Fix ethernet icon for systems with multiple NICs wherein `cat /sys/class/net/e*/operstate ` outputs multiple lines. Icon now shows connected when one or more NICs are connected.
This commit is contained in:
Brandon 2024-01-14 17:00:12 -05:00 committed by GitHub
parent 7a96fb100c
commit 1ddcf99fc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@ elif [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ] ; then
fi
# Ethernet
[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="🌐" || ethericon="❎"
[ "$(cat /sys/class/net/e*/operstate 2>/dev/null | grep "up")" = 'up' ] && ethericon="🌐" || ethericon="❎"
# TUN
[ -n "$(cat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon=" 🔒"