Files
scripts/sh/waybar-updates
T
adamfandClaude Opus 5.5 6af444ad72 Add waybar update counter and up script, drop Steam/Waterfox/Discord buttons
Show all 8 workspaces persistently in the workspaces module.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 11:10:50 +01:00

14 lines
427 B
Bash
Executable File

#!/bin/bash
# waybar-updates: prints pending repo + AUR update count, nothing when up to date
repo=$(checkupdates 2>/dev/null)
aur=$(yay -Qua 2>/dev/null)
list=$(printf '%s\n%s\n' "$repo" "$aur" | sed '/^$/d')
[ -z "$list" ] && exit 0
count=$(wc -l <<<"$list")
tooltip=$(head -40 <<<"$list" | sed 's/&/\&amp;/g; s/</\&lt;/g' | sed ':a;N;$!ba;s/\n/\\n/g')
printf '{"text": "UPD: %s", "tooltip": "%s"}\n' "$count" "$tooltip"