diff options
| author | Andrew Guschin <saintruler@gmail.com> | 2021-11-15 15:31:17 +0400 |
|---|---|---|
| committer | Andrew Guschin <saintruler@gmail.com> | 2021-11-15 15:31:17 +0400 |
| commit | b815b8dc30a9632e159bf4347d615b067503215f (patch) | |
| tree | b6ea0d48d364ccd7c7341576711112fa156c9f84 /.local/bin/lemonbar/modules/battery.py | |
| parent | 54d45cc3ddc50fb0db021aca14ea9284c7937984 (diff) | |
Removed unneeded scripts
Diffstat (limited to '.local/bin/lemonbar/modules/battery.py')
| -rw-r--r-- | .local/bin/lemonbar/modules/battery.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/.local/bin/lemonbar/modules/battery.py b/.local/bin/lemonbar/modules/battery.py deleted file mode 100644 index 7cf3c54..0000000 --- a/.local/bin/lemonbar/modules/battery.py +++ /dev/null @@ -1,14 +0,0 @@ -def read_file(filename): - with open(filename) as f: - return f.read().strip() - -def callback(): - battery = "BAT0" - try: - now = int(read_file(f"/sys/class/power_supply/{battery}/energy_now")) - full = int(read_file(f"/sys/class/power_supply/{battery}/energy_full")) - percent = round(now / full * 100) - return f"BAT: {percent}%" - except FileNotFoundError: - return f"BAT: Disabled" - |