all repos — tint2 @ d8c289e0ccdbaa48bbda2c348d8f5a6a9117f5d0

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

More battery data
o9000 mrovi9000@gmail.com
commit

d8c289e0ccdbaa48bbda2c348d8f5a6a9117f5d0

parent

5a17bb2fda5a8e38f28187d06642c95ce1f5916b

97 files changed, 259 insertions(+), 0 deletions(-)

jump to
A test/2battery-gijsbers/AC0/online

@@ -0,0 +1,1 @@

+1
A test/2battery-gijsbers/AC0/power/async

@@ -0,0 +1,1 @@

+disabled
A test/2battery-gijsbers/AC0/power/runtime_status

@@ -0,0 +1,1 @@

+unsupported
A test/2battery-gijsbers/AC0/power/wakeup

@@ -0,0 +1,1 @@

+enabled
A test/2battery-gijsbers/AC0/type

@@ -0,0 +1,1 @@

+Mains
A test/2battery-gijsbers/AC0/uevent

@@ -0,0 +1,1 @@

+POWER_SUPPLY_ONLINE=1
A test/2battery-gijsbers/BAT0/capacity

@@ -0,0 +1,1 @@

+17
A test/2battery-gijsbers/BAT0/capacity_level

@@ -0,0 +1,1 @@

+Critical
A test/2battery-gijsbers/BAT0/charge_type

@@ -0,0 +1,1 @@

+Fast
A test/2battery-gijsbers/BAT0/health

@@ -0,0 +1,1 @@

+Good
A test/2battery-gijsbers/BAT0/manufacturer

@@ -0,0 +1,1 @@

+Linux
A test/2battery-gijsbers/BAT0/model_name

@@ -0,0 +1,1 @@

+Fake battery 1
A test/2battery-gijsbers/BAT0/power/async

@@ -0,0 +1,1 @@

+disabled
A test/2battery-gijsbers/BAT0/power/runtime_status

@@ -0,0 +1,1 @@

+unsupported
A test/2battery-gijsbers/BAT0/power/wakeup

@@ -0,0 +1,1 @@

+enabled
A test/2battery-gijsbers/BAT0/serial_number

@@ -0,0 +1,1 @@

+12345678
A test/2battery-gijsbers/BAT0/status

@@ -0,0 +1,1 @@

+Charging
A test/2battery-gijsbers/BAT0/technology

@@ -0,0 +1,1 @@

+Li-ion
A test/2battery-gijsbers/BAT0/temp

@@ -0,0 +1,1 @@

+26
A test/2battery-gijsbers/BAT0/type

@@ -0,0 +1,1 @@

+Battery
A test/2battery-gijsbers/BAT0/uevent

@@ -0,0 +1,1 @@

+POWER_SUPPLY_VOLTAGE_NOW=3300
A test/2battery-gijsbers/BAT0/voltage_now

@@ -0,0 +1,1 @@

+3300
A test/2battery-gijsbers/BAT1/charge_type

@@ -0,0 +1,1 @@

+Fast
A test/2battery-gijsbers/BAT1/health

@@ -0,0 +1,1 @@

+Good
A test/2battery-gijsbers/BAT1/manufacturer

@@ -0,0 +1,1 @@

+Linux
A test/2battery-gijsbers/BAT1/model_name

@@ -0,0 +1,1 @@

+Fake battery 2
A test/2battery-gijsbers/BAT1/power/async

@@ -0,0 +1,1 @@

+disabled
A test/2battery-gijsbers/BAT1/power/runtime_status

@@ -0,0 +1,1 @@

+unsupported
A test/2battery-gijsbers/BAT1/power/wakeup

@@ -0,0 +1,1 @@

+enabled
A test/2battery-gijsbers/BAT1/serial_number

@@ -0,0 +1,1 @@

+12345678
A test/2battery-gijsbers/BAT1/status

@@ -0,0 +1,1 @@

+Charging
A test/2battery-gijsbers/BAT1/technology

@@ -0,0 +1,1 @@

+Li-ion
A test/2battery-gijsbers/BAT1/temp

@@ -0,0 +1,1 @@

+26
A test/2battery-gijsbers/BAT1/type

@@ -0,0 +1,1 @@

+Battery
A test/2battery-gijsbers/BAT1/uevent

@@ -0,0 +1,1 @@

+POWER_SUPPLY_VOLTAGE_NOW=3300
A test/2battery-gijsbers/BAT1/voltage_now

@@ -0,0 +1,1 @@

+3300
A test/2battery-gijsbers/bat.txt

@@ -0,0 +1,130 @@

+AC0/type:Mains +AC0/power/control:auto +AC0/power/wakeup_prevent_sleep_time_ms:0 +AC0/power/async:disabled +AC0/power/wakeup_abort_count:0 +AC0/power/wakeup_active:0 +AC0/power/wakeup_total_time_ms:0 +AC0/power/wakeup_active_count:4 +AC0/power/runtime_enabled:disabled +AC0/power/runtime_active_kids:0 +AC0/power/runtime_active_time:0 +AC0/power/wakeup_max_time_ms:0 +AC0/power/wakeup_count:4 +AC0/power/wakeup_last_time_ms:18773802 +AC0/power/wakeup:enabled +AC0/power/runtime_status:unsupported +AC0/power/runtime_usage:0 +AC0/power/wakeup_expire_count:0 +AC0/power/runtime_suspended_time:0 +AC0/online:1 +AC0/uevent:POWER_SUPPLY_NAME=AC0 +AC0/uevent:POWER_SUPPLY_ONLINE=1 +BAT0/temp:26 +BAT0/type:Battery +BAT0/power/control:auto +BAT0/power/wakeup_prevent_sleep_time_ms:0 +BAT0/power/async:disabled +BAT0/power/wakeup_abort_count:0 +BAT0/power/wakeup_active:0 +BAT0/power/wakeup_total_time_ms:0 +BAT0/power/wakeup_active_count:4 +BAT0/power/runtime_enabled:disabled +BAT0/power/runtime_active_kids:0 +BAT0/power/runtime_active_time:0 +BAT0/power/wakeup_max_time_ms:0 +BAT0/power/wakeup_count:4 +BAT0/power/wakeup_last_time_ms:18773802 +BAT0/power/wakeup:enabled +BAT0/power/runtime_status:unsupported +BAT0/power/runtime_usage:0 +BAT0/power/wakeup_expire_count:0 +BAT0/power/runtime_suspended_time:0 +BAT0/charge_full_design:100 +BAT0/charge_now:17 +BAT0/charge_full:100 +BAT0/charge_type:Fast +BAT0/capacity:17 +BAT0/health:Good +BAT0/capacity_level:Critical +BAT0/status:Charging +BAT0/voltage_now:3300 +BAT0/uevent:POWER_SUPPLY_NAME=BAT0 +BAT0/uevent:POWER_SUPPLY_STATUS=Charging +BAT0/uevent:POWER_SUPPLY_CHARGE_TYPE=Fast +BAT0/uevent:POWER_SUPPLY_HEALTH=Good +BAT0/uevent:POWER_SUPPLY_PRESENT=1 +BAT0/uevent:POWER_SUPPLY_TECHNOLOGY=Li-ion +BAT0/uevent:POWER_SUPPLY_CHARGE_FULL_DESIGN=100 +BAT0/uevent:POWER_SUPPLY_CHARGE_FULL=100 +BAT0/uevent:POWER_SUPPLY_CHARGE_NOW=17 +BAT0/uevent:POWER_SUPPLY_CAPACITY=17 +BAT0/uevent:POWER_SUPPLY_CAPACITY_LEVEL=Critical +BAT0/uevent:POWER_SUPPLY_TIME_TO_EMPTY_AVG=612 +BAT0/uevent:POWER_SUPPLY_TIME_TO_FULL_NOW=612 +BAT0/uevent:POWER_SUPPLY_MODEL_NAME=Fake battery 1 +BAT0/uevent:POWER_SUPPLY_MANUFACTURER=Linux +BAT0/uevent:POWER_SUPPLY_SERIAL_NUMBER=12345678 +BAT0/uevent:POWER_SUPPLY_TEMP=26 +BAT0/uevent:POWER_SUPPLY_VOLTAGE_NOW=3300 +BAT0/model_name:Fake battery 1 +BAT0/manufacturer:Linux +BAT0/technology:Li-ion +BAT0/time_to_full_now:612 +BAT0/time_to_empty_avg:612 +BAT0/serial_number:12345678 +BAT0/present:1 +BAT1/temp:26 +BAT1/type:Battery +BAT1/power/control:auto +BAT1/power/wakeup_prevent_sleep_time_ms:0 +BAT1/power/async:disabled +BAT1/power/wakeup_abort_count:0 +BAT1/power/wakeup_active:0 +BAT1/power/wakeup_total_time_ms:0 +BAT1/power/wakeup_active_count:4 +BAT1/power/runtime_enabled:disabled +BAT1/power/runtime_active_kids:0 +BAT1/power/runtime_active_time:0 +BAT1/power/wakeup_max_time_ms:0 +BAT1/power/wakeup_count:4 +BAT1/power/wakeup_last_time_ms:18773802 +BAT1/power/wakeup:enabled +BAT1/power/runtime_status:unsupported +BAT1/power/runtime_usage:0 +BAT1/power/wakeup_expire_count:0 +BAT1/power/runtime_suspended_time:0 +BAT1/charge_full_design:100 +BAT1/charge_now:7 +BAT1/charge_full:100 +BAT1/charge_type:Fast +BAT1/capacity:7 +BAT1/health:Good +BAT1/capacity_level:Low +BAT1/status:Charging +BAT1/voltage_now:3300 +BAT1/uevent:POWER_SUPPLY_NAME=BAT1 +BAT1/uevent:POWER_SUPPLY_STATUS=Charging +BAT1/uevent:POWER_SUPPLY_CHARGE_TYPE=Fast +BAT1/uevent:POWER_SUPPLY_HEALTH=Good +BAT1/uevent:POWER_SUPPLY_PRESENT=1 +BAT1/uevent:POWER_SUPPLY_TECHNOLOGY=Li-ion +BAT1/uevent:POWER_SUPPLY_CHARGE_FULL_DESIGN=100 +BAT1/uevent:POWER_SUPPLY_CHARGE_FULL=100 +BAT1/uevent:POWER_SUPPLY_CHARGE_NOW=7 +BAT1/uevent:POWER_SUPPLY_CAPACITY=7 +BAT1/uevent:POWER_SUPPLY_CAPACITY_LEVEL=Low +BAT1/uevent:POWER_SUPPLY_TIME_TO_EMPTY_AVG=252 +BAT1/uevent:POWER_SUPPLY_TIME_TO_FULL_NOW=252 +BAT1/uevent:POWER_SUPPLY_MODEL_NAME=Fake battery 2 +BAT1/uevent:POWER_SUPPLY_MANUFACTURER=Linux +BAT1/uevent:POWER_SUPPLY_SERIAL_NUMBER=12345678 +BAT1/uevent:POWER_SUPPLY_TEMP=26 +BAT1/uevent:POWER_SUPPLY_VOLTAGE_NOW=3300 +BAT1/model_name:Fake battery 2 +BAT1/manufacturer:Linux +BAT1/technology:Li-ion +BAT1/time_to_full_now:252 +BAT1/time_to_empty_avg:252 +BAT1/serial_number:12345678 +BAT1/present:1
A test/expand2.py

@@ -0,0 +1,34 @@

+#!/usr/bin/env python2 + +# Creates directory tree printed by: +# bash -c "for d in /sys/class/power_supply/* ; do find $d/ -exec sh -c 'echo {} ; cat {} ' ';' ; done" 2>&1 | tee out.txt + +import os +import sys + + +def flush(path, content): + if not path or "/" not in path: + return + path = "./" + path + dir_path, fname = path.rsplit("/", 1) + try: + os.makedirs("./" + dir_path) + except: + pass + with open("./" + path, "w") as f: + f.write(content) + + +with open(sys.argv[1], "r") as f: + path = None + content = "" + for line in f: + if "/" in line and ":" in line: + flush(path, content) + content = "" + path, content = line.split(":", 1) + else: + content += line + if content: + flush(path, content)