Update indicator in Polybar bar not updated


#21

Nothing better than to try it out. Top job @natemaia


#22

I have this script and module and everything works

[module/pkg]
type = custom/script
exec = $HOME/.config/polybar/scripts/pkg.sh
exec-if = "ping -q -w 2 -c 1 176.34.135.167 > /dev/null"
label = %{A1:termite --exec=pacli & disown:} %{A3:termite --exec=pacli & disown:}%output%%{A} %{A}
interval = 10
tail = true
format-background = #0d000000
#!/usr/bin/env bash

pac=$(checkupdates | wc -l)

if [[ "$pac" > "1" ]]; then
  echo %{F#6BA4E7}$pac %{F#6BA4E7}

else
  echo  

fi

#23

What’s there to tail in this script? It runs once top to bottom and exits.

To be a tail-able script it needs to run in an infinite loop and output info continuously.

Then a bar or whatever can grab that output and display it.

Furthermore in the module you have interval = 10 which means it will just be run every 10 seconds.

Hope that’s not too hard to understand and I didn’t drone on :stuck_out_tongue:


#24

in fact I did not understand anything.:smiley::smile::sweat_smile:
What do I do, I put yours in my polybar?


#25

No yours if perfectly fine :stuck_out_tongue: I was just saying they both do the same thing (yours and mine above) and that the current one we have with AL is broken because it uses the tail in polybar, if you set interval it will override tail.


#26

Thank for the info @natemaia