Add some scripts

This commit is contained in:
ayushDumasia 2024-09-15 12:31:53 +05:30
parent 0ec6e946f7
commit 9a48ec9810
8 changed files with 140 additions and 0 deletions

17
bin/pacman-updates.sh Executable file
View file

@ -0,0 +1,17 @@
#!/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