From e4a97eca105c8dc308066339021afcc1295dc099 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sat, 17 Nov 2018 18:26:19 +0100 Subject: [PATCH] [modules/battery_all] Remove showdevice parameter Showing the device name doesn't add anything for the battery_all module, as it combines all batteries. --- README.md | 2 +- bumblebee/modules/battery_all.py | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 89bb042..f4c8ef7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Test Coverage](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status/badges/coverage.svg)](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status/coverage) [![Issue Count](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status/badges/issue_count.svg)](https://codeclimate.com/github/tobi-wan-kenobi/bumblebee-status) -**Many, many thanks to all contributors! As of now, 33 of the modules are from various contributors (!), and only 17 from myself.** +**Many, many thanks to all contributors! As of now, 34 of the modules are from various contributors (!), and only 17 from myself.** ![Solarized Powerline](https://github.com/tobi-wan-kenobi/bumblebee-status/blob/master/screenshots/themes/powerline-solarized.png) diff --git a/bumblebee/modules/battery_all.py b/bumblebee/modules/battery_all.py index 9118937..4430e27 100644 --- a/bumblebee/modules/battery_all.py +++ b/bumblebee/modules/battery_all.py @@ -6,7 +6,6 @@ Parameters: * battery.device : Comma-separated list of battery devices to read information from (defaults to auto for auto-detection) * battery.warning : Warning threshold in % of remaining charge (defaults to 20) * battery.critical : Critical threshold in % of remaining charge (defaults to 10) - * battery.showdevice : If set to "true", add the device name to the widget (defaults to False) """ import os @@ -86,11 +85,6 @@ class Module(bumblebee.engine.Module): and self.getCharge(widget) == "Discharging": output = "{} {}".format(output, self.remaining()) - if bumblebee.util.asbool(self.parameter("showdevice", False)): - output = "{} ({})".format(output, os.path.basename(widget.name)) - - - return output @@ -135,4 +129,4 @@ class Module(bumblebee.engine.Module): if charge_list[x] == "Discharging": charge = charge_list[x] break - return charge \ No newline at end of file + return charge