nix-config/modules/eww/scripts/wifi.sh
2024-03-22 23:35:56 -07:00

12 lines
237 B
Bash
Executable file

#!/bin/sh
if iwctl station wlan0 show | grep -q "connected"; then
icon=""
ssid=Amadeus
status="Connected to ${ssid}"
else
icon="睊"
status="offline"
fi
echo "{\"icon\": \"${icon}\", \"status\": \"${status}\"}"