Show all 8 workspaces persistently in the workspaces module. Co-Authored-By: Claude Opus 5.5 <[email protected]>
14 lines
427 B
Bash
Executable File
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/&/\&/g; s/</\</g' | sed ':a;N;$!ba;s/\n/\\n/g')
|
|
|
|
printf '{"text": "UPD: %s", "tooltip": "%s"}\n' "$count" "$tooltip"
|