#!/bin/bash

get_icon() {
    [ $(cat /sys/class/net/w*/operstate 2>/dev/null) = down ] && echo "󰪎" || echo "󰖟"
}

# Output initial state
get_icon

# Monitor network changes
nmcli monitor | while read -r line; do
    get_icon
done
