Moved the docstring and added usage examples.
This commit is contained in:
parent
e9835070e2
commit
18062dd416
@ -1,15 +1,25 @@
|
|||||||
"""
|
|
||||||
This module counts the available updates using yaourt.
|
|
||||||
By default it will only count aur packages.
|
|
||||||
If you want to count both pacman and aur packages set the variable
|
|
||||||
count_only_aur = False
|
|
||||||
"""
|
|
||||||
import re
|
import re
|
||||||
from i3pystatus.core.command import run_through_shell
|
from i3pystatus.core.command import run_through_shell
|
||||||
from i3pystatus.updates import Backend
|
from i3pystatus.updates import Backend
|
||||||
|
|
||||||
|
|
||||||
class Yaourt(Backend):
|
class Yaourt(Backend):
|
||||||
|
"""
|
||||||
|
This module counts the available updates using yaourt.
|
||||||
|
By default it will only count aur packages. Thus it can be used with the pacman backend like this:
|
||||||
|
|
||||||
|
from i3pystatus.updates import pacman, yaourt
|
||||||
|
status.register("updates",
|
||||||
|
backends = [pacman.Pacman(), yaourt.Yaourt()])
|
||||||
|
|
||||||
|
If you want to count both pacman and aur packages with this module you can set the variable
|
||||||
|
count_only_aur = False like this:
|
||||||
|
|
||||||
|
from i3pystatus.updates import yaourt
|
||||||
|
status.register("updates",
|
||||||
|
backends = [yaourt.Yaourt(False)])
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, aur_only=True):
|
def __init__(self, aur_only=True):
|
||||||
self.aur_only = aur_only
|
self.aur_only = aur_only
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user