How to use a sript in qtile bar

i am trying to get the checkupdates widget work in qtile stable bar and it ONLY appears when i myself go check for updates through the terminal,it should just pop up when there is a update , i am also trying to figure out how to use my script that i use in polybar for pacman updates that pops up in red issuing a update and disappears after your upgrade is finished which the checkupdates widget in qtile should do heres whats in config.py

widget.CheckUpdates(
display_format =‘Updates: {updates}’,
colour_have_updates = RED,
update_interval=100,),

so maybe i should use the markup=true?

heres the updates.sh for polybar or do i need a .py which from my understanding either one of them wold work through widget.Textbox

#!/bin/sh
updates=$(checkupdates | wc -l)

if [ “$updates” -gt 0 ]; then
echo “ $updates”
else
echo “”
fi

heres a pacman notifier in .py but im not experienced enough to read the code in python yet

heres how to use a script in textbox but not the way i want it i guess so it needs modification

there’s also the pacman widget which also works just the color stays white even when i use the unavailable=white and foreground = red flag,

maybe someone can point me in the right direction,thank you all!!

Are you trying to use the qtile built in widget CheckUpdates to check for the updates?

If so, I think you need to provide more information to the widget - namely the distro; ArchLabs is vanilla Arch so “Arch” should work.

From what you posted, I don’t think that widget is making any kind of query.

2 Likes

solved with

widget.CheckUpdates(
distro=‘Arch_checkupdates’,
display_format=’ Updates {updates}’,
colour_have_updates=RED,
execute = ‘/home/panos21/.config/qtile/pacupdate’,
no_update_string = ‘’,
update_interval=60),