This commit is contained in:
Spangenberg
2023-11-08 22:32:18 +01:00
parent aa0f005523
commit 144f573fda
13 changed files with 188 additions and 4 deletions

24
eww/scripts/checksystemupdates Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
# Requires pacman-contrib trizen
# Define threshholds for color indicators
threshhold_green=0
threshhold_yellow=25
threshhold_red=100
# Calculate available updates pacman and aur (with trizen)
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
updates_aur=0
fi
updates=$(("$updates_arch" + "$updates_aur"))
if [[ $updates -gt 0 ]]; then
printf '󰻍'
else
printf '󰳈'
fi