18 lines
293 B
Bash
18 lines
293 B
Bash
![]() |
#!/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
|