1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-26 06:08:35 +01:00

updated module pkg waybar

This commit is contained in:
eoli3n 2020-12-23 14:41:44 +01:00
parent 3e7ee2b923
commit 9cbbe21f83

@ -1,4 +1,6 @@
#!/bin/bash
pacman_check() {
pac=$(checkupdates 2>/dev/null | wc -l)
aur=$(trizen -Qua 2>/dev/null | wc -l)
@ -14,3 +16,22 @@ else
#echo "$pac %{F#5b5b5b}%{F-} $aur"
echo "$pac <span foreground='#929292'></span> $aur"
fi
}
xbps_check(){
pkg=(xbps-install -nu | wc -l)
if [[ $pkg -eq "0" ]] || [[ ! $pkg =~ [0-9]+ ]]
then
exit 0
fi
echo "<span foreground='#929292'></span> $pkg"
}
if grep -i "arch" /etc/os-release
then
pacman_check
elif grep -i "void" /etc/os-release
then
xbps_check
fi