From 7ea8c5320d57e2fb8c9e59dfa9da487526ca2731 Mon Sep 17 00:00:00 2001 From: Tobi-wan Kenobi Date: Sat, 10 Dec 2016 12:03:58 +0100 Subject: [PATCH] [modules] Add help texts see #23 --- bumblebee/modules/battery.py | 8 ++++++++ bumblebee/modules/cmus.py | 6 +++++- bumblebee/modules/nic.py | 8 ++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/bumblebee/modules/battery.py b/bumblebee/modules/battery.py index ee58d27..2e945de 100644 --- a/bumblebee/modules/battery.py +++ b/bumblebee/modules/battery.py @@ -1,5 +1,13 @@ # pylint: disable=C0111,R0903 +"""Displays battery status, remaining percentage and charging information. + +Parameters: + * battery.device : The device to read information from (defaults to BAT0) + * battery.warning : Warning threshold in % of remaining charge (defaults to 20) + * battery.critical: Critical threshold in % of remaining charge (defaults to 10) +""" + import os import bumblebee.input diff --git a/bumblebee/modules/cmus.py b/bumblebee/modules/cmus.py index 488de5a..0505294 100644 --- a/bumblebee/modules/cmus.py +++ b/bumblebee/modules/cmus.py @@ -1,6 +1,10 @@ # pylint: disable=C0111,R0903 -"""Displays information about the current song in cmus.""" +"""Displays information about the current song in cmus. + +Parameters: + * cmus.format: Format string for the song information. Tag values can be put in curly brackets (i.e. {artist}) +""" from collections import defaultdict diff --git a/bumblebee/modules/nic.py b/bumblebee/modules/nic.py index 2459be7..bd94f94 100644 --- a/bumblebee/modules/nic.py +++ b/bumblebee/modules/nic.py @@ -1,5 +1,11 @@ #pylint: disable=C0111,R0903 +"""Displays the name, IP address(es) and status of each available network interface. + +Parameters: + * nic.exclude: Comma-separated list of interface prefixes to exclude (defaults to "lo,virbr,docker,vboxnet,veth") +""" + import netifaces import bumblebee.util @@ -7,8 +13,6 @@ import bumblebee.input import bumblebee.output import bumblebee.engine -"""Displays the name, IP address(es) and status of each available network interface.""" - class Module(bumblebee.engine.Module): def __init__(self, engine, config): widgets = []