Update indicator in Polybar bar not updated


After I have installed updates, the update indicator still shows available updates, though there are no more updates.


Is that before or after reboot ! Might do something.


That’s before reboot. I find it somehow strange that I still see the indicator “5 Updates” just after I did the update. Not a major bug of course.


Well , on my Tint2 I don t see updates at all, pimped it a bit , I look @ the terminal instead.


I use the standard Archlabs Tint2 config. Therefore I consider that as a bug. But again: Not a major one.


Cool , but wonder why it does so. Tried to search for it but had to go.


You may want to use kexec, if you are too lazy for bios reboot or need to stay inside your session.


sudo pacman -Syu
#pacman -Syu


To add to @ector , I would try this before his command in terminal ;

Pacman -Scc

also. & see what it does.


My system just told me that there are 6 new updates. I execute:

sudo pacman -Scc

Followed by

sudo pacman -Syu

The updates are applied. After that, the Tint2 update indicator still shows “6 Updates”. That’s no surprise IMO since I always do updates via

sudo pacman -Syu


Sorry, I mixed it up. The update indicator is not shown in/by Tint2 but by Polybar. Just figured that out by looking into the polybar config. Seems, that a script update.sh is used to retrieve the update information.


Wow, anyways that it s Polybar or Tint2 it should not be like that after updates.


It’s a one time only command that runs when the polybar module is run with polybar. It doesn’t auto update after pacman is run; that would require some more elaborate scripting.

You can check the polybar module or script to see if there is a refresh rate and decrease it if you want.

Or restart polybar with something like:

pkill -x -SIGUSR1 polybar

after updating.


We don’t have an update indicator for tint2 in our configs so this can’t be right.

Regarding the updates in polybar however, it’s a small script ~/bin/updates.sh (won’t be included with future releases) and it loops on two timers, one 30 min when no updates and the other 10 sec when updates. This is to avoid constantly hitting the server with requests and user cpu/network contantly, it’s unrealistic to do it more often and may still be too often. If you want it faster you can just decrease the sleep times.


True @natemaia , the op corrected it in an above post stating it was in Polybar.


That’s not quite right, it loops over a couple timers based on if there’s updates or not, worst case would be 30 min before the module would be updated, best case would be between 1-10 sec. See above.


My mistake.


No problem @natemaia , no biggie here . lol You might have went over it without knowing it, it happens .


@natemaia: In my case that doesn’t work. Even 2 hours after I have updated the system, the update indicator still shows that there are updates (which is not the case). And as I have written, I did not change the standard config in this regard.


Ok, I just did a fresh install to see a few things.

Polybar has changed something and tail modules no longer work.

Replace the script with something like this and it should be ok


UPDATES=$(checkupdates 2>/dev/null | wc -l)

if (( UPDATES == 1 )); then
	echo "$UPDATES Update"
elif (( UPDATES > 1 )); then
	echo "$UPDATES Updates"
	echo $BAR_ICON

and change the module to be

type = custom/script
exec = updates.sh
exec-if = "ping -q -w 2 -c 1 > /dev/null"
label-padding = 1
label = %output%

Same goes for the network script and module


dc1='/' dc2='\' wl='' eth=''

if { ping -c 1 archlabslinux.com || ping -c 1 archlinux.org; } >/dev/null 2>&1; then
	if ip link | awk '/state UP/ {print $2}' | grep -q 'e*'; then
		echo "$eth"
		echo "$wl"
	sleep 25
	echo "$dc1" && sleep 0.6 && echo "$dc2" && sleep 0.6


type = custom/script
exec = check-network
click-left = networkmanager_dmenu &
click-right = networkmanager_dmenu &
label-padding = 1

Lemme know if that works for you.