diff --git a/scripts/bar.sh b/scripts/bar.sh index 72b6ff0..2da07d7 100755 --- a/scripts/bar.sh +++ b/scripts/bar.sh @@ -3,7 +3,7 @@ FIFO="/tmp/bar.fifo" FORMAT_LEFT=" %(music)s %(services)s %(diskspace)s" -FORMAT_RIGHT="%(wifi)s %(battery)s %(clock)s " +FORMAT_RIGHT="%(updates)s %(wifi)s %(battery)s %(clock)s " icon_color="#A0A57E" icon() { echo -n "%{F$icon_color}"; printf '%b' "\ue$1"; echo -n "%{F-}"; } @@ -113,8 +113,8 @@ clock() { updates() { while true; do - updates=$(pkginfo.sh) - echo -n "$icon_updates $updates" + updates=$(./pkginfo.sh) + echo updates "$icon_updates $updates" > $FIFO; sleep 20 done } @@ -146,6 +146,7 @@ music & services & diskspace & wifi & +updates & ( while true; do cat $FIFO; done ) | python ./barformatter.py "$FORMAT_LEFT" "$FORMAT_RIGHT" | lemonbar -g 1366x15 -f "Stlarch:size=6:style=regular" -f "Terminus:size=8" -B "#88000000" | run_handler diff --git a/scripts/pkginfo.sh b/scripts/pkginfo.sh index e521be3..5c77340 100755 --- a/scripts/pkginfo.sh +++ b/scripts/pkginfo.sh @@ -14,7 +14,7 @@ useless_packages() { pacman -Qtdq | wc -l } -if [ -Z "$internet" ]; then +if [ -z "$internet" ]; then pac=? aur=? else