Merge pull request #293 from Stunkymonkey/hide_seconds_battery

hide seconds in battery by default
This commit is contained in:
Ingo Bürk 2018-06-29 22:49:52 +02:00 committed by GitHub
commit 78c0a53c45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 5 deletions

View File

@ -375,7 +375,7 @@ int main(int argc, char *argv[]) {
CFG_STR("threshold_type", "time", CFGF_NONE), CFG_STR("threshold_type", "time", CFGF_NONE),
CFG_BOOL("last_full_capacity", false, CFGF_NONE), CFG_BOOL("last_full_capacity", false, CFGF_NONE),
CFG_BOOL("integer_battery_capacity", false, CFGF_NONE), CFG_BOOL("integer_battery_capacity", false, CFGF_NONE),
CFG_BOOL("hide_seconds", false, CFGF_NONE), CFG_BOOL("hide_seconds", true, CFGF_NONE),
CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_ALIGN_OPT,
CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_COLOR_OPTS,
CFG_CUSTOM_MIN_WIDTH_OPT, CFG_CUSTOM_MIN_WIDTH_OPT,

View File

@ -333,8 +333,8 @@ estimated to be empty. If you want to use the last full capacity instead of the
design capacity (when using the design capacity, it may happen that your design capacity (when using the design capacity, it may happen that your
battery is at 23% when fully charged because its old. In general, I want to battery is at 23% when fully charged because its old. In general, I want to
see it this way, because it tells me how worn off my battery is.), just specify see it this way, because it tells me how worn off my battery is.), just specify
+last_full_capacity = true+. You can hide seconds in the remaining time and +last_full_capacity = true+. You can show seconds in the remaining time and
empty time estimations by setting +hide_seconds = true+. empty time estimations by setting +hide_seconds = false+.
If you want the battery percentage to be shown without decimals, add If you want the battery percentage to be shown without decimals, add
+integer_battery_capacity = true+. +integer_battery_capacity = true+.

View File

@ -1 +1 @@
BAT 30.64% 02:09:32 BAT 30.64% 02:09

View File

@ -1 +1 @@
Touchpad: 30.64% BAT 02:09:32 Touchpad: 30.64% BAT 02:09

View File

@ -0,0 +1,4 @@
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_CURRENT_NOW=1107000
POWER_SUPPLY_CHARGE_FULL_DESIGN=7800000
POWER_SUPPLY_CHARGE_NOW=2390000

View File

@ -0,0 +1 @@
BAT 30.64% 02:09:32

View File

@ -0,0 +1,11 @@
general {
output_format = "none"
}
order += "battery all"
battery all {
format = "%status %percentage %remaining"
path = "testcases/021-battery-second/BAT%d_uevent"
hide_seconds = false
}