]> git.sur5r.net Git - i3/i3status/commitdiff
hide seconds in battery by default 293/head
authorFelix Buehler <account@buehler.rocks>
Fri, 29 Jun 2018 11:35:20 +0000 (13:35 +0200)
committerFelix Buehler <account@buehler.rocks>
Fri, 29 Jun 2018 12:37:48 +0000 (14:37 +0200)
i3status.c
man/i3status.man
testcases/001-battery/expected_output.txt
testcases/015-battery-capacity/expected_output.txt
testcases/021-battery-second/BAT0_uevent [new file with mode: 0644]
testcases/021-battery-second/expected_output.txt [new file with mode: 0644]
testcases/021-battery-second/i3status.conf [new file with mode: 0644]

index 316159c26440c182aec3fd270f4d0e31d901eb65..8621f2c257bbb04705f0e860666bd20a15ae0c1c 100644 (file)
@@ -375,7 +375,7 @@ int main(int argc, char *argv[]) {
         CFG_STR("threshold_type", "time", CFGF_NONE),
         CFG_BOOL("last_full_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_COLOR_OPTS,
         CFG_CUSTOM_MIN_WIDTH_OPT,
index 31f25adfcd7c9003fb15d7151da52010c9648094..5c6acc13e2818e7dbd08310f75e7441966029479 100644 (file)
@@ -335,8 +335,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
 battery is at 23% when fully charged because it’s old. In general, I want to
 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
-empty time estimations by setting +hide_seconds = true+.
++last_full_capacity = true+. You can show seconds in the remaining time and
+empty time estimations by setting +hide_seconds = false+.
 
 If you want the battery percentage to be shown without decimals, add
 +integer_battery_capacity = true+.
index 6e1898b1a8e0ff05a0df1d72e9eb89c6f819ef5d..ab4bc9f6882900a819b30aa9b441d754bee94c07 100644 (file)
@@ -1 +1 @@
-BAT 30.64% 02:09:32
+BAT 30.64% 02:09
index 663a593f52df52ddf40435fc7700dc82ca48c408..fb37af8476d1d236cbdd5abc62a9cba96cb89e4f 100644 (file)
@@ -1 +1 @@
-Touchpad: 30.64% BAT 02:09:32
+Touchpad: 30.64% BAT 02:09
diff --git a/testcases/021-battery-second/BAT0_uevent b/testcases/021-battery-second/BAT0_uevent
new file mode 100644 (file)
index 0000000..b994324
--- /dev/null
@@ -0,0 +1,4 @@
+POWER_SUPPLY_STATUS=Discharging
+POWER_SUPPLY_CURRENT_NOW=1107000
+POWER_SUPPLY_CHARGE_FULL_DESIGN=7800000
+POWER_SUPPLY_CHARGE_NOW=2390000
diff --git a/testcases/021-battery-second/expected_output.txt b/testcases/021-battery-second/expected_output.txt
new file mode 100644 (file)
index 0000000..6e1898b
--- /dev/null
@@ -0,0 +1 @@
+BAT 30.64% 02:09:32
diff --git a/testcases/021-battery-second/i3status.conf b/testcases/021-battery-second/i3status.conf
new file mode 100644 (file)
index 0000000..3aa2262
--- /dev/null
@@ -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
+}