From e6d88abaae6bb84a8422cbc22f69bd567bb0ad4a Mon Sep 17 00:00:00 2001 From: schroeji Date: Thu, 17 Sep 2015 12:10:49 +0200 Subject: [PATCH] Added yaourt backend for the updates script. --- i3pystatus/updates/yaourt.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 i3pystatus/updates/yaourt.py diff --git a/i3pystatus/updates/yaourt.py b/i3pystatus/updates/yaourt.py new file mode 100644 index 0000000..023aaea --- /dev/null +++ b/i3pystatus/updates/yaourt.py @@ -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 \ No newline at end of file