From 1b425c346d784c0a130b1c383e1d3d44ec913f6c Mon Sep 17 00:00:00 2001 From: adam <56338480+adastx@users.noreply.github.com> Date: Mon, 10 Oct 2022 00:00:05 +0200 Subject: polybar: moved update script --- .local/bin/updates | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 .local/bin/updates (limited to '.local/bin') diff --git a/.local/bin/updates b/.local/bin/updates new file mode 100755 index 0000000..7af054a --- /dev/null +++ b/.local/bin/updates @@ -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 + +aur_ignored=$($HOME/.local/bin/aurignored | wc -l) + +updates=$((updates_arch + updates_aur - $aur_ignored)) + +if [ "$updates" -gt 0 ]; then + echo " $updates" +fi -- cgit v1.2.3-70-g09d2