Waybar scripts/network_traffic.sh fails on interface names with hyphens

I have a bridge network interface called br-dc43d81dfd4f which causes the script network_traffic.sh to fail before its enumerated all the interfaces and so no network traffic is displayed in the waybar.
The problem arises because the script uses the iface name as a variable name, and hyphens aren’t valid in BASH variable names. I’ve knocked up a fix which sanitizes the names, and it works now. But it would be good to have an official fix.

Perhaps not relevant here, but here’s the output of garuda-inxi:

System:
  Kernel: 6.18.5-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 15.2.1
    clocksource: tsc avail: acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=9f2ab008-f249-4a03-b54f-d8f94c7fe009 rw rootflags=subvol=@
    quiet loglevel=3
  Desktop: Hyprland v: 0.53.1 with: waybar tools: avail: hypridle,hyprlock
    vt: 1 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
  Type: Laptop System: Dell product: XPS 17 9710 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0T0D00 v: A00 serial: <superuser required> part-nu: 0A5D
    uuid: <superuser required> Firmware: UEFI vendor: Dell v: 1.37.0
    date: 09/04/2025
Battery:
  ID-1: BAT0 charge: 75 Wh (78.9%) condition: 95.1/95.1 Wh (100%) health: good
    temp: 26.4 C volts: 13.02 min: 11.4 model: BYD DELL F8CPG54 made: 2025-04-15
    type: Li-poly serial: <filter> charging: status: charging control:
    start: 50% end: 90% type: adaptive
    avail: adaptive,custom,fast,standard,trickle cycles: N/A
CPU:
  Info: model: 11th Gen Intel Core i7-11800H bits: 64 type: MT MCP
    arch: Tiger Lake gen: core 11 level: v4 note: check built: 2020
    process: Intel 10nm family: 6 model-id: 0x8D (141) stepping: 1
    microcode: 0x56
  Topology: cpus: 1x dies: 1 clusters: 8 cores: 8 threads: 16 tpc: 2
    smt: enabled cache: L1: 640 KiB desc: d-8x48 KiB; i-8x32 KiB L2: 10 MiB
    desc: 8x1.2 MiB L3: 24 MiB desc: 1x24 MiB
  Speed (MHz): avg: 800 min/max: 800/4600 scaling: driver: intel_pstate
    governor: powersave cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800
    8: 800 9: 800 10: 800 11: 800 12: 800 13: 800 14: 800 15: 800 16: 800
    bogomips: 73728
  Flags-basic: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Dell driver: i915
    v: kernel alternate: xe arch: Xe process: Intel 10nm built: 2020-21 ports:
    active: DP-6,DP-7 off: eDP-1 empty: DP-1, DP-2, DP-3, DP-4, DP-5
    bus-ID: 0000:00:02.0 chip-ID: 8086:9a60 class-ID: 0300
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Mobile] vendor: Dell
    driver: nvidia v: 590.48.01 alternate: nouveau,nvidia_drm
    non-free: 550-580.xx+ status: current (as of 2025-11; EOL~2026-12-xx)
    arch: Ampere code: GAxxx process: TSMC n7 (7nm) built: 2020-2023
    bus-ID: 0000:01:00.0 chip-ID: 10de:25a2 class-ID: 0302
  Device-3: Microdia Integrated_Webcam_HD driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-11:2
    chip-ID: 0c45:672e class-ID: 0e02
  Device-4: Logitech C920 PRO HD Webcam driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.1 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 5-2.3.2:7
    chip-ID: 046d:08e5 class-ID: 0102
  Display: wayland server: X.org v: 1.21.1.21 with: Xwayland v: 24.1.9
    compositor: Hyprland v: 0.53.1 driver: X: loaded: modesetting,nvidia
    alternate: fbdev,intel,nouveau,nv,vesa dri: iris gpu: i915 display-ID: 1
  Monitor-1: DP-6 model: Samsung LU28R55 serial: <filter> built: 2021 res:
    mode: 3840x2160 hz: 60 scale: 150% (1.5) to: 2560x1440 dpi: 154 gamma: 1.2
    size: 632x360mm (24.88x14.17") diag: 727mm (28.6") ratio: 16:9 modes:
    max: 3840x2160 min: 720x400
  Monitor-2: DP-7 model: Samsung LU28R55 serial: <filter> built: 2021 res:
    mode: 3840x2160 hz: 60 scale: 150% (1.5) to: 2560x1440 dpi: 154 gamma: 1.2
    size: 632x360mm (24.88x14.17") diag: 727mm (28.6") ratio: 16:9 modes:
    max: 3840x2160 min: 720x400
  Monitor-3: eDP-1 model: Sharp 0x1517 built: 2021 res: 3840x2160 dpi: 266
    gamma: 1.2 size: 366x229mm (14.41x9.02") diag: 432mm (17") ratio: 16:10
    modes: 3840x2400
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: gpu: nvidia-smi wl: wdisplays,wlr-randr x11: xprop,xrandr
Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: Dell
    driver: sof-audio-pci-intel-tgl alternate: snd_soc_avs,
    snd_sof_pci_intel_tgl, snd_hda_intel bus-ID: 0000:00:1f.3
    chip-ID: 8086:43c8 class-ID: 0401
  Device-2: Creative Stage SE mini
    driver: hid-generic,snd-usb-audio,usb-storage,usbhid type: USB rev: 1.1
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 5-2.2:11 chip-ID: 041e:3295
    class-ID: 0300 serial: <filter>
  Device-3: Logitech C920 PRO HD Webcam driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.1 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 5-2.3.2:7
    chip-ID: 046d:08e5 class-ID: 0102
  API: ALSA v: k6.18.5-zen1-1-zen status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 1.4.9 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Tiger Lake PCH CNVi WiFi vendor: Rivet Networks
    driver: iwlwifi v: kernel bus-ID: 0000:00:14.3 chip-ID: 8086:43f0
    class-ID: 0280
  IF: wlp0s20f3 state: down mac: <filter>
  Device-2: Realtek RTL8153 Gigabit Ethernet Adapter driver: r8152 type: USB
    rev: 3.0 speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 6-2.4:4
    chip-ID: 0bda:8153 class-ID: 0000 serial: <filter>
  IF: enp4s0u2u4 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: br-dc43d81dfd4f state: down mac: <filter>
  IF-ID-2: docker0 state: down mac: <filter>
  IF-ID-3: wt0 state: unknown speed: N/A duplex: N/A mac: N/A
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-14:3 chip-ID: 8087:0026
    class-ID: e001
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: disabled
    rfk-block: hardware: no software: yes address: N/A
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 port: N/A bus-ID: 0000:00:0e.0 chip-ID: 8086:9a0b rev: class-ID: 0104
Drives:
  Local Storage: total: 1.38 TiB used: 180.28 GiB (12.8%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: KIOXIA
    model: KXG60ZNV512G NVMe 512GB size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 10604107 temp: 25.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:7 vendor: Crucial model: CT1000P5PSSD8
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: P7CR402 temp: 32.9 C
    scheme: GPT
Partition:
  ID-1: / raw-size: 931.51 GiB size: 931.51 GiB (100.00%)
    used: 180.14 GiB (19.3%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:8
  ID-2: /boot/efi raw-size: 200 MiB size: 196 MiB (98.00%)
    used: 143.8 MiB (73.4%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 931.51 GiB size: 931.51 GiB (100.00%)
    used: 180.14 GiB (19.3%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:8
  ID-4: /var/log raw-size: 931.51 GiB size: 931.51 GiB (100.00%)
    used: 180.14 GiB (19.3%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:8
  ID-5: /var/tmp raw-size: 931.51 GiB size: 931.51 GiB (100.00%)
    used: 180.14 GiB (19.3%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:8
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 62.52 GiB used: 0 KiB (0.0%) priority: 100
    comp: zstd avail: lzo-rle,lzo,lz4,lz4hc,deflate,842 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 49.0 C mobo: 31.0 C
  Fan Speeds (rpm): cpu: 1296 fan-1: 1231
Info:
  Memory: total: 64 GiB note: est. available: 62.52 GiB used: 8.01 GiB (12.8%)
  Processes: 401 Power: uptime: 36m states: freeze,mem,disk suspend: s2idle
    wakeups: 0 hibernate: platform avail: shutdown, reboot, suspend, test_resume
    image: 24.96 GiB services: upowerd Init: systemd v: 259 default: graphical
    tool: systemctl
  Packages: 1432 pm: nix-default pkgs: 0 pm: nix-sys pkgs: 0 pm: nix-usr
    pkgs: 7 libs: 2 pm: pacman pkgs: 1425 libs: 361 tools: pacseek,paru
    Compilers: clang: 21.1.6 gcc: 15.2.1 Shell: Bash v: 5.3.9 running-in: foot
    inxi: 3.3.40
Garuda (2.12.2-1):
  System install date:     2026-01-03
  Garuda release:          251103
  Last full system update: 2026-01-15 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut nvidia-utils nvidia-open-dkms garuda-hardware-profile-nvidia garuda-hardware-profile-standard
  Windows dual boot:       Probably (Run as root to verify)
  Failed units:            
--- System Health Check Report ---
25/26 checks run in 0.60 seconds ⌛
Powered by garuda-health 🦅

--- INFO ---
 - A reboot is pending (update applied since last reboot)

✅ System health check passed. No issues found.

We need it every time. :slight_smile: No discussion necessary!

Not everyone knows that network_traffic.sh belongs to Hyprland

, which means your query should also be moved to this category.

Please let us know your solution so that we can close the thread.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.