mine-hyprdots/bin/pacman-updates.sh

18 lines
293 B
Bash
Raw Normal View History

2024-09-15 12:31:53 +05:30
#!/bin/sh
# Script for use in waybar to display # of pacman updates
OUTPUT="$(checkupdates)"
if [ -z "$OUTPUT" ]; then
exit 0
else
NUMBER="$(echo "$OUTPUT" | wc -l)"
TEXT="󰏔"
TOOLTIP="$NUMBER updates found"
echo "{\"text\":\"""$TEXT""\", \"tooltip\":\"""$TOOLTIP""\"}"
exit 0
fi