1
0
Fork 0

add tun devices to sb-network

This commit is contained in:
Luca Bilke 2024-08-06 13:58:47 +02:00
parent a96426ff8a
commit 19ebfc5112

View file

@ -32,6 +32,11 @@ wireguard() {
shift=" "
}
tun() {
printf "%b" "$shift󰖂 $connection"
shift=" "
}
ethernet() {
case "$state" in
connected) icon="󰱓" ;;
@ -48,6 +53,8 @@ fallback() {
:
}
IFS="
"
for x in $(nmcli --terse device status); do
device="$(echo "$x" | cut -d: -f1)"
type="$(echo "$x" | cut -d: -f2)"
@ -56,7 +63,7 @@ for x in $(nmcli --terse device status); do
info="/sys/class/net/${device}"
case "$type" in
wifi | wireguard | ethernet) $type ;;
wifi | wireguard | ethernet | tun) $type ;;
*) fallback ;;
esac
unset device type state connection info icon