You are not logged in.
I was looking for a script to display packge info in conky, but I couldn't find a decent one. I saw others, but I couldn't tweak them because it looked like a tsunami hit them. So I wrote my own.
Tell me what you think.
#!/usr/bin/env python
import commands
def echo_lst():
status, output = commands.getstatusoutput("pacman -Qu")
if not "no upgrades found." in output:
pkglst, sep, junk = output.partition("Total Download Size:")
pkglst = pkglst.split()
del pkglst[0:6]
del sep, junk
if len(pkglst) > 1:
print("{0} updated package(s) available:".format(len(pkglst)))
elif not len(pkglst) == 0:
print("The world is ending, please back up your data.")
for pkg in pkglst:
print(pkg)
else:
print("No updated packages available")
echo_lst()
Last edited by knopper92 (2009-08-02 19:32:44)
Offline