mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-26 14:12:23 +00:00
18 lines
309 B
Bash
18 lines
309 B
Bash
|
#!/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
|
||
|
updates_aur=0
|
||
|
fi
|
||
|
|
||
|
updates=$(("$updates_arch" + "$updates_aur"))
|
||
|
|
||
|
if [ "$updates" -gt 0 ]; then
|
||
|
echo "%{F#dd0}🔃%{F-} $updates"
|
||
|
else
|
||
|
echo ""
|
||
|
fi
|