bumblebee-status/bumblebee_status/modules/contrib
Antoine Beaupré 16c4ce2ee6
handle missing battery case
I run the same bumblebee-status configuration on my laptop and my
workstation. On my laptop, the upower module works fine: it says "ac"
when plugged in, charging, all that stuff is great.

But on my workstation, it's completely broken: it thinks there's a
battery (which is a mistake: there is no battery at all, apart maybe
from the CMOS battery, but that's not covered by upower), and it
thinks it's discharged, which makes a very noisy warning in the bar.

Now maybe there's something wrong with dbus, Debian, the kernel,
Linux, or some thing else in the stack. All I know is that
`self.power.get_display_device()` returns something like a valid
dbus object here and from there it confuses the heck out of the
module.

So this just adds a function to check if the actual device we're
talking about is actually present, and bails earlier otherwise.

Before: battery logo and "0% 00:00m!", all marked as critical ("red")

After: "ac" with the plugged in logo, not marked critical ("black")
2022-06-20 11:34:12 -04:00
..
__init__.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
amixer.py [doc] update docstrings as per PR #683 2020-07-18 08:23:28 +02:00
apt.py add updating view on apt-cache on click 2022-01-13 11:05:01 +01:00
arandr.py [util/popup] fix endless loop on "close on leave" 2022-01-14 13:39:04 +01:00
arch-update.py arch-update: sleep 1 sec before checking 2022-05-01 12:15:29 +02:00
arch_update.py Create symbolic links 2020-10-01 19:10:46 -03:00
aur-update.py add documentation and screenshot for aur-update 2022-03-15 15:56:42 +05:30
battery-upower.py handle missing battery case 2022-06-20 11:34:12 -04:00
battery.py [modules/battery] gracefully handle "no batteries" case 2020-05-28 08:17:35 +02:00
battery_upower.py Create symbolic links 2020-10-01 19:10:46 -03:00
bluetooth.py [modules/bluetooth] Add more error checking 2021-09-10 12:45:11 +02:00
bluetooth2.py [modules/bluetooth] Add more error checking 2021-09-10 12:45:11 +02:00
blugon.py added module for blugon 2022-01-20 21:06:17 +00:00
brightness.py [doc] update docstrings as per PR #683 2020-07-18 08:23:28 +02:00
caffeine.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
cmus.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
cpu2.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
currency.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
datetimetz.py [doc] update docstrings as per PR #683 2020-07-18 08:23:28 +02:00
datetz.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
deadbeef.py [pip] updated/fixed dependencies 2020-12-02 21:21:34 +01:00
deezer.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
dnf.py [modules/contrib/dnf] fix undefined "widget" error 2020-08-28 14:03:34 +02:00
docker_ps.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
dunst.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
dunstctl.py chore: public toggle method 2021-10-11 19:16:14 -03:00
emerge_status.py New module emerge_status 2022-01-06 08:06:57 +01:00
gcalendar.py Changed __time_format to self.__time_format. 2022-04-08 17:09:28 +02:00
getcrypto.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
github.py [github]: Remove error printing if exception caught 2020-08-20 10:47:56 -03:00
gpmdp.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
hddtemp.py [modules/hddtemp] fix typo 2021-02-12 09:30:24 +01:00
hostname.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
http_status.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
indicator.py [doc] update docstrings as per PR #683 2020-07-18 08:23:28 +02:00
kernel.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
layout-xkbswitch.py Create layout-xkbswitch tests 2020-10-07 17:37:04 -03:00
layout.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
layout_xkbswitch.py Create symbolic links 2020-10-01 19:10:46 -03:00
libvirtvms.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
messagereceiver.py Merge pull request #681 from bbernhard/messagereceiver 2020-07-11 19:33:42 +02:00
mocp.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
mpd.py mpd and title 2022-03-07 08:50:30 +05:30
network.py Slight refactoring to try and break apart networkmethod 2021-07-09 00:28:00 -05:00
network_traffic.py Improve network traffic module tests 2020-09-01 22:12:54 -03:00
notmuch_count.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
nvidiagpu.py fix: correct mem usage to be mem *io* usage 2021-08-15 22:27:44 -06:00
octoprint.py small improvements in octoprint plugin 2020-08-30 09:03:34 +02:00
optman.py Use the existing util.cli module 2021-06-30 11:31:42 +05:30
pacman.py [packaging/pip] Make binary utility tools functional 2020-05-10 12:52:20 +02:00
pamixer.py [modules]: introduce pamixer module 2022-05-26 13:00:40 +02:00
persian_date.py [contrib/persian_date] refactor using core.datetime module as parent 2022-03-10 11:53:19 +03:30
pihole.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
playerctl.py Fix missing playback_status 2022-04-24 16:09:54 +01:00
pomodoro.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
portage_status.py [doc] add module portage_status (plus attribution) 2020-07-12 19:31:28 +02:00
prime.py [doc] update docstrings as per PR #683 2020-07-18 08:23:28 +02:00
progress.py Hide progress module if it's inactive 2022-05-13 10:21:31 +01:00
publicip.py [modules/publicip] handle missing public ip more gracefully 2022-02-14 14:58:01 +01:00
rofication.py add rofication module 2020-11-23 20:44:17 -08:00
rotation.py [modules/rotation] fix widget creation 2021-04-03 19:29:40 +00:00
rss.py [modules/rss] fix insecure use of tempfile 2022-02-11 13:44:10 +01:00
sensors.py [modules/sensors] use util.format.asbool() + auto-check only if no path is specified 2021-10-21 14:43:15 +02:00
shell.py [modules/shell] remove obsolete event handlers 2021-03-18 15:30:03 +01:00
shortcut.py [doc/shortcut] better example for shortcut module 2021-04-03 19:24:01 +00:00
smartstatus.py [module] Improved smartstatus with combined_singles 2020-11-06 12:14:56 +01:00
solaar.py refactor code to decrease cognitive complexity in update 2021-10-26 19:52:42 +02:00
spaceapi.py [pip] updated/fixed dependencies 2020-12-02 21:21:34 +01:00
spotify.py Silence exceptions in the spotify module which may write large amounts of logs to ~/.xsession-errors 2021-12-28 00:34:10 +01:00
stock.py [doc] Remove requests dependency in stock module 2021-03-02 17:00:14 +01:00
sun.py Fix exception in location.py. 2022-02-14 15:36:24 +02:00
system.py Add popup command parameter to the system module 2022-05-20 09:21:26 +01:00
taskwarrior.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
thunderbird.py [modules/thunderbird]: Thunderbird's unread email counts by inbox 2020-09-05 19:22:40 -03:00
timetz.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
title.py mpd and title 2022-03-07 08:50:30 +05:30
todo.py Update todo.py 2021-08-14 20:16:45 +03:00
todo_org.py Add org-mode TODO module 2020-10-04 14:44:27 +01:00
traffic.py [modules/traffic] ignore all errors during update 2020-06-20 13:52:55 +02:00
twmn.py [doc] update docstrings as per PR #683 2020-07-18 08:23:28 +02:00
uptime.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
vpn.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
watson.py [all] small fixed picked up by pytest 2020-06-02 20:13:39 +02:00
weather.py [all] small fixed picked up by pytest 2020-06-02 20:13:39 +02:00
xkcd.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
yubikey.py [core] restructure to allow PIP packaging 2020-05-09 21:22:00 +02:00
zpool.py [doc] update docstrings as per PR #683 2020-07-18 08:23:28 +02:00