Swayscript: Fix multiword network names display.

This commit is contained in:
Dmitry Voronin 2024-12-13 08:02:59 +03:00
parent 52e743f5fa
commit 8330065084
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -4,9 +4,9 @@
function networkwidget() { function networkwidget() {
local IFS=$'\n' local IFS=$'\n'
local internet=$(nmcli networking connectivity check) local internet=$(nmcli networking connectivity check)
local _ethernets=($(nmcli connection show --active | rg ethernet | cut -f1 -d\ )) local _ethernets=($(nmcli connection show --active | rg ethernet | sed "s/ .*//"))
local _vpns=($(nmcli connection show --active | rg vpn | cut -f1 -d\ )) local _vpns=($(nmcli connection show --active | rg vpn | sed "s/ .*//"))
local _wifis=($(nmcli connection show --active | rg wifi | cut -f1 -d\ )) local _wifis=($(nmcli connection show --active | rg wifi | sed "s/ .*//"))
local _bts=($(bluetoothctl devices Connected | cut -d\ -f3)) local _bts=($(bluetoothctl devices Connected | cut -d\ -f3))
local icon="󰖩" local icon="󰖩"
local class="" local class=""