feat(waybar): add config

This commit is contained in:
2026-03-12 17:43:03 +01:00
parent f82afb4611
commit d7cb42a64c
6 changed files with 498 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# wrap swaync subscription, hide when no notifications
swaync-client -swb 2>/dev/null | while read -r line; do
count=$(echo "$line" | jq -r '.text // "0"')
class=$(echo "$line" | jq -r '.class // "none"')
if [[ "$count" == "0" ]]; then
echo '{"text": "", "class": "none"}'
else
jq -nc --arg text "󰂚 $count" --arg class "$class" '{$text,$class}'
fi
done