Add polybar scripts
This commit is contained in:
parent
a5d4ec5e4a
commit
9b4dd143f7
4 changed files with 106 additions and 5 deletions
21
.local/bin/polybar/poly-archupdates
Executable file
21
.local/bin/polybar/poly-archupdates
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
if ! updates_arch=$(yay -Qun 2>/dev/null | wc -l); then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
if ! updates_aur=$(yay -Qum 2>/dev/null | wc -l); then
|
||||
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
|
||||
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
updates=$(("$updates_arch" + "$updates_aur"))
|
||||
|
||||
if [ "$updates" -gt 0 ]; then
|
||||
echo "$updates"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue