17 lines
446 B
Bash
Executable file
17 lines
446 B
Bash
Executable file
#!/usr/bin/env bash
|
|
pac=$(checkupdates | wc -l)
|
|
aur=$(cower -u | wc -l)
|
|
|
|
last=$(</tmp/polybar-updates)
|
|
check=$((pac + aur))
|
|
if [[ "$check" != "0" ]]; then
|
|
echo "$pac %{F#5b5b5b}%{F-} $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#5b5b5b}%{F-}"
|
|
fi
|