Add some scripts
This commit is contained in:
parent
0ec6e946f7
commit
9a48ec9810
8 changed files with 140 additions and 0 deletions
17
bin/pacman-updates.sh
Executable file
17
bin/pacman-updates.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue