Added yaourt backend for the updates script.

This commit is contained in:
schroeji 2015-09-17 12:10:49 +02:00
parent f68d790ccc
commit e6d88abaae

View File

@ -0,0 +1,17 @@
"""
This module counts the available updates using yaourt.
You should not use it together with the pacman backend otherwise
some packeges might be counted twice.
"""
from i3pystatus.core.command import run_through_shell
from i3pystatus.updates import Backend
class Yaourt(Backend):
@property
def updates(self):
command = ["yaourt", "-Qua"]
checkupdates = run_through_shell(command)
return checkupdates.out.count('\n')
Backend = Yaourt