18 lines
468 B
Bash
Executable file
18 lines
468 B
Bash
Executable file
#!/usr/bin/env bash
|
|
pac=$(checkupdates | wc -l)
|
|
aur=$(cower -u | wc -l)
|
|
|
|
last=$(</tmp/polybar-updates)
|
|
check=$((pac + aur))
|
|
icon=""
|
|
if [[ "$check" != "0" ]]; then
|
|
echo "%{F#e5e8e6}${icon}%{F-} $pac,$aur"
|
|
if [[ $last != "$pac$aur" ]]; then
|
|
notify-send "$((pac+aur)) updates available"
|
|
aplay -N -q ~/.config/polybar/sounds/robni7-news-ting.wav
|
|
echo "$pac$aur" >/tmp/polybar-updates
|
|
fi
|
|
else
|
|
echo "%{F#22e5e8e6}${icon}%{F-} "
|
|
fi
|