Support auracle as an update backend (#669)
This commit is contained in:
parent
55f8812bc9
commit
82f9548a2c
24
i3pystatus/updates/auracle.py
Normal file
24
i3pystatus/updates/auracle.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
from i3pystatus.core.command import run_through_shell
|
||||||
|
from i3pystatus.updates import Backend
|
||||||
|
|
||||||
|
|
||||||
|
class Auracle(Backend):
|
||||||
|
"""
|
||||||
|
Checks for updates in Arch User Repositories using the `auracle` AUR helper.
|
||||||
|
|
||||||
|
Depends on auracle AUR agent - https://github.com/falconindy/auracle
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def updates(self):
|
||||||
|
command = ["auracle", "sync"]
|
||||||
|
auracle = run_through_shell(command)
|
||||||
|
return auracle.out.count('\n'), auracle.out
|
||||||
|
|
||||||
|
Backend = Auracle
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
"""
|
||||||
|
Call this module directly; Print the update count and notification body.
|
||||||
|
"""
|
||||||
|
print("Updates: {}\n\n{}".format(*Backend().updates))
|
Loading…
Reference in New Issue
Block a user