diff options
author | Adam <56338480+adastx@users.noreply.github.com> | 2022-05-16 22:57:58 +0200 |
---|---|---|
committer | Adam <56338480+adastx@users.noreply.github.com> | 2022-05-16 23:58:05 +0200 |
commit | 7d568cb97f41ef027a834e1252c0703c52cdd050 (patch) | |
tree | fd3af393791a1840b2c8bf300d2f0a472156e554 /.config/polybar/extra | |
parent | 378313e07bf819379cbbea96267c97592f3eab64 (diff) |
polybar: show # of pacman and AUR updates
Diffstat (limited to '.config/polybar/extra')
-rwxr-xr-x | .config/polybar/extra/updates-pacman-aurhelper.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.config/polybar/extra/updates-pacman-aurhelper.sh b/.config/polybar/extra/updates-pacman-aurhelper.sh new file mode 100755 index 0000000..ec5cb53 --- /dev/null +++ b/.config/polybar/extra/updates-pacman-aurhelper.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then + updates_arch=0 +fi + +# if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then +if ! updates_aur=$(paru -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 |