add tun devices to sb-network
This commit is contained in:
parent
a96426ff8a
commit
19ebfc5112
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue