sb-network: add tun devices
This commit is contained in:
parent
a96426ff8a
commit
da9e1b0647
1 changed files with 8 additions and 1 deletions
|
@ -32,6 +32,11 @@ wireguard() {
|
||||||
shift=" "
|
shift=" "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tun() {
|
||||||
|
printf "%b" "$shift $connection"
|
||||||
|
shift=" "
|
||||||
|
}
|
||||||
|
|
||||||
ethernet() {
|
ethernet() {
|
||||||
case "$state" in
|
case "$state" in
|
||||||
connected) icon="" ;;
|
connected) icon="" ;;
|
||||||
|
@ -48,6 +53,8 @@ fallback() {
|
||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IFS="
|
||||||
|
"
|
||||||
for x in $(nmcli --terse device status); do
|
for x in $(nmcli --terse device status); do
|
||||||
device="$(echo "$x" | cut -d: -f1)"
|
device="$(echo "$x" | cut -d: -f1)"
|
||||||
type="$(echo "$x" | cut -d: -f2)"
|
type="$(echo "$x" | cut -d: -f2)"
|
||||||
|
@ -56,7 +63,7 @@ for x in $(nmcli --terse device status); do
|
||||||
info="/sys/class/net/${device}"
|
info="/sys/class/net/${device}"
|
||||||
|
|
||||||
case "$type" in
|
case "$type" in
|
||||||
wifi | wireguard | ethernet) $type ;;
|
wifi | wireguard | ethernet | tun) $type ;;
|
||||||
*) fallback ;;
|
*) fallback ;;
|
||||||
esac
|
esac
|
||||||
unset device type state connection info icon
|
unset device type state connection info icon
|
||||||
|
|
Loading…
Add table
Reference in a new issue