Document format values for swap/memory widgets

master
Emiel Kollof 2018-12-20 20:18:55 +01:00 committed by ramnes
parent f1d2cd462f
commit 616e136bc9
2 changed files with 12 additions and 3 deletions

View File

@ -32,10 +32,15 @@ def get_meminfo():
class Memory(base.InLoopPollText): class Memory(base.InLoopPollText):
"""Displays memory usage""" """Displays memory usage
MemUsed: Returns memory in use
MemTotal: Returns total amount of memory
MemFree: Returns amount of memory free
"""
orientations = base.ORIENTATION_HORIZONTAL orientations = base.ORIENTATION_HORIZONTAL
defaults = [ defaults = [
("fmt", "{MemUsed}M/{MemTotal}M", "Formatting for field names") ("fmt", "{MemUsed}M/{MemTotal}M", "Formatting for field names. Named modeled after Linux /proc, but portable with other Unices")
] ]
def __init__(self, **config): def __init__(self, **config):

View File

@ -33,7 +33,11 @@ def get_swapinfo():
class Swap(base.InLoopPollText): class Swap(base.InLoopPollText):
"""Displays memory usage""" """Displays swap usage
SwapUsed: Returns swap used
SwapTotal: Returns total amount of swap space
SwapFree: Returns amount of swap free
"""
orientations = base.ORIENTATION_HORIZONTAL orientations = base.ORIENTATION_HORIZONTAL
defaults = [ defaults = [
("fmt", "{SwapUsed}M/{SwapTotal}M", "Format field names") ("fmt", "{SwapUsed}M/{SwapTotal}M", "Format field names")