Age | Commit message (Collapse) | Author |
|
In my case, the voltage variable would stay initialized as -1,
which caused the calculation of battery charge percentage to be
incorrect (I would get the message that there is no battery present
or even -0% charge).
I have no idea how this would affect other systems, since I don't
have a chance to test this.
|
|
Apparently some notebooks report a negative current, whereas most don’t.
fixes #1249
|
|
This patch takes a similar approach as the NetBSD CPU temperature
code in that it uses proplib(3) to walk dictionaries supplied by
envsys(4).
In addition to providing the basic functionality, it:
* Provides all existing format specifiers (%emptytime %consumption
%status %percentage %remaining)
* Respects all existing config options (hide_seconds, low_threshold,
integer_battery_capacity, last_full_capacity)
* Projects "time until full" when battery status is CS_CHARGING
|
|
* strncmp(s1, s2, strlen(s2)) → BEGINS_WITH(s1, s2)
* strncmp(s1, s2, strlen(s1)) → strcmp(s1, s2)
* Prefer case-insensitive comparison for options
|
|
|
|
fixes: #1134
|
|
|
|
|
|
|
|
|
|
|
|
|
|
On some systems, the discharge rate may be missing, although the battery
is still working. This leads to an edge case on Linux systems in which
the output may not be colorized although a threshold was defined.
This commit fixes the behavior by colorizing output if threshold_type is
set to "percentage". Since we cannot calculate remaining time without
discharge rate, output is still uncolorized in case of threshold_type
set to "time".
|
|
- fix the battery status printing in %status.
- fix remaining time when we're charging.
- use colors to indicate battery status.
- small cleanups.
|
|
|
|
If the battery is not discharging it may be not possible to give information on
remaining time or consumption. The resulting strings (%remaining, %consumption,
%emptytime) are empty then. But because they are in the format string, the
output string contains unnecessary spaces in this case.
This commit makes i3status strip these spaces.
|
|
The battery threshold can now be configured as type "time" or
"percentage", but defaults to "time" to prevent unexpected behavior.
Also, low_threshold was set to a more reasonable default of 30.
|
|
|
|
Fixes #752
|
|
|
|
|
|
|
|
discharging
|
|
single BATT_STATUS_NAME macro. It simplifies customisation of the hard-wired status text.
|
|
|
|
This hopefully fixes http://bugs.i3wm.org/707
|
|
|
|
|
|
|
|
This hardcodes all the JSON parts. Strings are not properly escaped currently.
The best/easiest way to fix this is by actually using libyajl.
|
|
|
|
CURRENT_NOW was deprecated for some battery types in recent linux kernels
(2.6.36)
|
|
|
|
|
|
|
|
|
|
|
|
We finally switched to libconfuse for a configuration file format
which does not require much work for the programmer nor for the user.
Plus, it avoids the Not-Invented-Here syndrome of yet another config
file format.
Furthermore, as a consequence of providing format strings for every
"module" (ipv6, wireless, …), we directly print the output and thus
we needed to drop support for wmii. This allowed us to get rid of
quite some complexity.
Documentation about the new configuration file and options will
follow. This commit is the beginning of what will be i3status v2.0.
|