forked from external/yambar
exemples/scripts: pacman.sh: display tags early
This commit is contained in:
parent
0f1c3548ae
commit
075ddf3f50
1 changed files with 7 additions and 1 deletions
|
@ -37,6 +37,12 @@ _err() {
|
||||||
printf -- '%s\n' "[$(date +'%Y-%m-%d %H:%M:%S')]: $*" >&2
|
printf -- '%s\n' "[$(date +'%Y-%m-%d %H:%M:%S')]: $*" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Display tags before yambar fetch the updates number
|
||||||
|
printf -- '%s\n' "pacman|int|0"
|
||||||
|
printf -- '%s\n' "aur|int|0"
|
||||||
|
printf -- '%s\n' "pkg|int|0"
|
||||||
|
printf -- '%s\n' ""
|
||||||
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
# Change interval
|
# Change interval
|
||||||
|
@ -53,6 +59,7 @@ while true; do
|
||||||
|
|
||||||
if ! hash "${aur_helper}" >/dev/null 2>&1; then
|
if ! hash "${aur_helper}" >/dev/null 2>&1; then
|
||||||
_err "aur helper not found, change it in the script"
|
_err "aur helper not found, change it in the script"
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
aur_num=$("${aur_helper}" -Qmu | wc -l)
|
aur_num=$("${aur_helper}" -Qmu | wc -l)
|
||||||
fi
|
fi
|
||||||
|
@ -71,4 +78,3 @@ done
|
||||||
unset -v interval aur_helper pacman_num aur_num pkg_num
|
unset -v interval aur_helper pacman_num aur_num pkg_num
|
||||||
unset -f _err
|
unset -f _err
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue