You are not logged in.

#1 2011-06-19 15:34:12

laite
Member
Registered: 2011-06-05
Posts: 33

Problem viewing available pacman updates with conky

Hi. I'm having problems with showing available package updates in my conky layout. I tried to follow instructions from archwiki https://wiki.archlinux.org/index.php/Co … nformation but none of the scripts seemed to work correctly, but instead they always show 'System is up to date' even though 'pacman -Qu' shows multiple packages available for update.

Following https://bbs.archlinux.org/viewtopic.php?id=37284 my conky has (I changed 'python' -> 'python2' so script compiles):

${texeci 10800 python2 /home/laite/.config/awesome/conky/packages_python.py}

Actually, I just noticed that last post in that topic seems to have the same problem than me (https://bbs.archlinux.org/viewtopic.php … 74#p863474)

Does anybody know how to get this working or maybe some other way to show updates in conky? I already tried all the scripts from wiki with no luck.

Offline

#2 2011-06-19 17:29:47

ViruSzZ
Member
From: The Streets
Registered: 2010-10-14
Posts: 202
Website

Re: Problem viewing available pacman updates with conky

I'm not using conky at this time, but when I was using it, I had a cronjob which was synchronizing pacman's db. Something like:

pacman -Syy 2>&1 > /dev/null

I was getting the results in conky using this simple bash script:

#!/bin/bash
_pacPackages=$(pacman -Qu | wc -l)
if [ $_pacPackages -eq 0 ];
then
        echo "No new packages";
elif [ $_pacPackages -eq 1 ];
then
        echo "1 new package";
else
        echo "$_pacPackages new packages";
fi
exit 0

Hope that helps.


Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog

Offline

#3 2011-06-19 17:39:19

laite
Member
Registered: 2011-06-05
Posts: 33

Re: Problem viewing available pacman updates with conky

ViruSzZ wrote:

I'm not using conky at this time, but when I was using it, I had a cronjob which was synchronizing pacman's db. Something like:
Hope that helps.

Thank you, this helped. I got it working with conky now.

Offline

#4 2011-06-19 17:52:08

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 226

Re: Problem viewing available pacman updates with conky


ktr

Offline

#5 2011-06-19 17:54:25

laite
Member
Registered: 2011-06-05
Posts: 33

Re: Problem viewing available pacman updates with conky

Kooothor wrote:

Thanks smile

If somebody wants to know, here is my (very slightly) edited bash script:

#!/bin/bash
_pacPackages=$(pacman -Qu | wc -l)
if [ $_pacPackages -eq 0 ];
then
        echo "\${color #ffffff}Your system is up to date.";
elif [ $_pacPackages -eq 1 ];
then
        echo "\${color #ffaa00}1 new package";
else
        echo "\${color #ffaa00}$_pacPackages new packages";
fi
exit 0

and conky:

${execpi 7200 sh /home/laite/.config/awesome/conky/package.sh}

Also, I have script updating packages in cron/hourly:

#!/bin/sh
pacman -Sy

Offline

#6 2011-06-19 19:03:46

ViruSzZ
Member
From: The Streets
Registered: 2010-10-14
Posts: 202
Website

Re: Problem viewing available pacman updates with conky

laite wrote:
ViruSzZ wrote:

I'm not using conky at this time, but when I was using it, I had a cronjob which was synchronizing pacman's db. Something like:
Hope that helps.

Thank you, this helped. I got it working with conky now.


No prob Man.

Take care


Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog

Offline

Board footer

Powered by FluxBB