From 7c8ddc9c87d837c3de2238b7021bc9f5bbca0c66 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Sat, 18 Jul 2020 08:23:28 +0200 Subject: [PATCH] [doc] update docstrings as per PR #683 --- bumblebee_status/modules/contrib/amixer.py | 3 +++ bumblebee_status/modules/contrib/bluetooth.py | 2 +- bumblebee_status/modules/contrib/bluetooth2.py | 2 +- bumblebee_status/modules/contrib/brightness.py | 5 +++++ bumblebee_status/modules/contrib/datetimetz.py | 4 ++++ bumblebee_status/modules/contrib/github.py | 2 ++ bumblebee_status/modules/contrib/indicator.py | 3 +++ bumblebee_status/modules/contrib/octoprint.py | 5 ++++- bumblebee_status/modules/contrib/prime.py | 3 ++- bumblebee_status/modules/contrib/smartstatus.py | 4 ++++ bumblebee_status/modules/contrib/sun.py | 1 + bumblebee_status/modules/contrib/twmn.py | 3 +++ bumblebee_status/modules/contrib/zpool.py | 3 +++ bumblebee_status/modules/core/nic.py | 3 +++ bumblebee_status/modules/core/vault.py | 3 +++ 15 files changed, 42 insertions(+), 4 deletions(-) diff --git a/bumblebee_status/modules/contrib/amixer.py b/bumblebee_status/modules/contrib/amixer.py index 4ab30f9..b0fda92 100644 --- a/bumblebee_status/modules/contrib/amixer.py +++ b/bumblebee_status/modules/contrib/amixer.py @@ -1,5 +1,8 @@ """get volume level or control it +Requires the following executable: + * amixer + Parameters: * amixer.device: Device to use (default is Master,0) * amixer.percent_change: How much to change volume by when scrolling on the module (default is 4%) diff --git a/bumblebee_status/modules/contrib/bluetooth.py b/bumblebee_status/modules/contrib/bluetooth.py index 64fcc0b..b565494 100644 --- a/bumblebee_status/modules/contrib/bluetooth.py +++ b/bumblebee_status/modules/contrib/bluetooth.py @@ -1,4 +1,4 @@ -"""Displays bluetooth status (Bluez). Left mouse click launches manager app, +"""Displays bluetooth status (Bluez). Left mouse click launches manager app `blueman-manager`, right click toggles bluetooth. Needs dbus-send to toggle bluetooth state. Parameters: diff --git a/bumblebee_status/modules/contrib/bluetooth2.py b/bumblebee_status/modules/contrib/bluetooth2.py index 2bcdc32..b8fac09 100644 --- a/bumblebee_status/modules/contrib/bluetooth2.py +++ b/bumblebee_status/modules/contrib/bluetooth2.py @@ -1,4 +1,4 @@ -"""Displays bluetooth status. Left mouse click launches manager app, +"""Displays bluetooth status. Left mouse click launches manager app `blueman-manager`, right click toggles bluetooth. Needs dbus-send to toggle bluetooth state and python-dbus to count the number of connections diff --git a/bumblebee_status/modules/contrib/brightness.py b/bumblebee_status/modules/contrib/brightness.py index 28b94a8..dc1691a 100644 --- a/bumblebee_status/modules/contrib/brightness.py +++ b/bumblebee_status/modules/contrib/brightness.py @@ -2,6 +2,11 @@ """Displays the brightness of a display +The following executables can be used if `use_acpi` is not enabled: + * brightnessctl + * light + * xbacklight + Parameters: * brightness.step: The amount of increase/decrease on scroll in % (defaults to 2) * brightness.device_path: The device path (defaults to /sys/class/backlight/intel_backlight), can contain wildcards (in this case, the first matching path will be used); This is only used when brightness.use_acpi is set to true diff --git a/bumblebee_status/modules/contrib/datetimetz.py b/bumblebee_status/modules/contrib/datetimetz.py index e4baa4c..df4507f 100644 --- a/bumblebee_status/modules/contrib/datetimetz.py +++ b/bumblebee_status/modules/contrib/datetimetz.py @@ -2,6 +2,10 @@ """Displays the current date and time with timezone options. +Requires the following python packages: + * tzlocal + * pytz + Parameters: * datetimetz.format : strftime()-compatible formatting string * datetimetz.timezone : IANA timezone name diff --git a/bumblebee_status/modules/contrib/github.py b/bumblebee_status/modules/contrib/github.py index fc16df0..abcdfa5 100644 --- a/bumblebee_status/modules/contrib/github.py +++ b/bumblebee_status/modules/contrib/github.py @@ -5,6 +5,8 @@ Displays the unread GitHub notifications count for a GitHub user using the follo * https://developer.github.com/v3/activity/notifications/#notification-reasons +Uses `xdg-open` or `x-www-browser` to open web-pages. + Requires the following library: * requests diff --git a/bumblebee_status/modules/contrib/indicator.py b/bumblebee_status/modules/contrib/indicator.py index 6b01c41..63445f2 100644 --- a/bumblebee_status/modules/contrib/indicator.py +++ b/bumblebee_status/modules/contrib/indicator.py @@ -2,6 +2,9 @@ """Displays the indicator status, for numlock, scrolllock and capslock +Requires the following executable: + * xset + Parameters: * indicator.include: Comma-separated list of interface prefixes to include (defaults to 'numlock,capslock') * indicator.signalstype: If you want the signali type color to be 'critical' or 'warning' (defaults to 'warning') diff --git a/bumblebee_status/modules/contrib/octoprint.py b/bumblebee_status/modules/contrib/octoprint.py index ce1aa89..a324af2 100644 --- a/bumblebee_status/modules/contrib/octoprint.py +++ b/bumblebee_status/modules/contrib/octoprint.py @@ -1,9 +1,12 @@ # pylint: disable=C0111,R0903 -"""Displays the Octorpint status and the printer's bed/tools temperature in the status bar. +"""Displays the Octorrint status and the printer's bed/tools temperature in the status bar. Left click opens a popup which shows the bed & tools temperatures and additionally a livestream of the webcam (if enabled). +Prerequisites: + * tk python library (usually python-tk or python3-tk, depending on your distribution) + Parameters: * octoprint.address : Octoprint address (e.q: http://192.168.1.3) * octoprint.apitoken : Octorpint API Token (can be obtained from the Octoprint Webinterface) diff --git a/bumblebee_status/modules/contrib/prime.py b/bumblebee_status/modules/contrib/prime.py index 8a096cb..3fbd049 100644 --- a/bumblebee_status/modules/contrib/prime.py +++ b/bumblebee_status/modules/contrib/prime.py @@ -20,7 +20,8 @@ Parameters: * prime.nvidiastring: String to use when nvidia is selected (defaults to 'intel') * prime.intelstring: String to use when intel is selected (defaults to 'intel') -Requires the following executable: +Requires the following executables: + * sudo * prime-select contributed by `jeffeb3 `_ - many thanks! diff --git a/bumblebee_status/modules/contrib/smartstatus.py b/bumblebee_status/modules/contrib/smartstatus.py index 2b886e3..b5f3037 100644 --- a/bumblebee_status/modules/contrib/smartstatus.py +++ b/bumblebee_status/modules/contrib/smartstatus.py @@ -5,6 +5,10 @@ """Displays HDD smart status of different drives or all drives +Requires the following executables: + * sudo + * smartctl + Parameters: * smartstatus.display: how to display (defaults to 'combined', other choices: 'seperate' or 'singles') * smartstatus.drives: in the case of singles which drives to display, separated comma list value, multiple accepted (defaults to 'sda', example:'sda,sdc') diff --git a/bumblebee_status/modules/contrib/sun.py b/bumblebee_status/modules/contrib/sun.py index dddc10d..6b0734d 100644 --- a/bumblebee_status/modules/contrib/sun.py +++ b/bumblebee_status/modules/contrib/sun.py @@ -5,6 +5,7 @@ Requires the following python packages: * requests * suntime + * python-dateutil Parameters: * cpu.lat : Latitude of your location diff --git a/bumblebee_status/modules/contrib/twmn.py b/bumblebee_status/modules/contrib/twmn.py index 58b2ba1..0fc46b3 100644 --- a/bumblebee_status/modules/contrib/twmn.py +++ b/bumblebee_status/modules/contrib/twmn.py @@ -2,6 +2,9 @@ """Toggle twmn notifications. +Requires the following executable: + * systemctl + contributed by `Pseudonick47 `_ - many thanks! """ diff --git a/bumblebee_status/modules/contrib/zpool.py b/bumblebee_status/modules/contrib/zpool.py index 78cc26a..9863793 100644 --- a/bumblebee_status/modules/contrib/zpool.py +++ b/bumblebee_status/modules/contrib/zpool.py @@ -1,5 +1,8 @@ """Displays info about zpools present on the system +Requires the following executable: + * sudo (if `zpool.sudo` is explicitly set to `true`) + Parameters: * zpool.list: Comma-separated list of zpools to display info for. If empty, info for all zpools is displayed. (Default: '') diff --git a/bumblebee_status/modules/core/nic.py b/bumblebee_status/modules/core/nic.py index 75bcd77..d64a14f 100644 --- a/bumblebee_status/modules/core/nic.py +++ b/bumblebee_status/modules/core/nic.py @@ -5,6 +5,9 @@ Requires the following python module: * netifaces +Requires the following executable: + * iw + Parameters: * nic.exclude: Comma-separated list of interface prefixes to exclude (defaults to 'lo,virbr,docker,vboxnet,veth,br') * nic.include: Comma-separated list of interfaces to include diff --git a/bumblebee_status/modules/core/vault.py b/bumblebee_status/modules/core/vault.py index 0ec4257..28f37f4 100644 --- a/bumblebee_status/modules/core/vault.py +++ b/bumblebee_status/modules/core/vault.py @@ -4,6 +4,9 @@ Many thanks to [@bbernhard](https://github.com/bbernhard) for the idea! +Requires the following executable: + * pass (aka password-store) + Parameters: * vault.duration: Duration until password is cleared from clipboard (defaults to 30) * vault.location: Location of the password store (defaults to ~/.password-store)