summaryrefslogtreecommitdiff
path: root/src/print_battery_info.c
AgeCommit message (Collapse)Author
2013-02-23battery: initialize colorful_output to falseMichael Stapelberg
2013-02-14Added option to show battery capacity without decimalsJulien Lequertier
2012-11-15DragonFlyBSD support addedScott Tincman
2012-10-16bugfix: colorize output even without discharge rate (thanks f8l)Simon Elsbrock
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".
2012-10-10Various fixes for the OpenBSD section of the battery backend.Jasper Lievisse Adriaanse
- fix the battery status printing in %status. - fix remaining time when we're charging. - use colors to indicate battery status. - small cleanups.
2012-09-05print_battery.c: do END_COLOR only if START_COLOR was usedSimon Elsbrock
2012-08-31Eat unnecessary space from the battery format str.Piotr Domagalski
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.
2012-08-28add additional battery threshold type "percentage"Simon Elsbrock
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.
2012-08-13use correct units for battery calculationPhilipp Schaefer
2012-07-12Bugfix: Properly skip "consumption", not "consumptionbuf" (Thanks mloskot)Michael Stapelberg
Fixes #752
2012-07-11small style fix in src/print_battery_info.c (move comment)Michael Stapelberg
2012-07-11Calculate the consumption if POWER_SUPPLY_POWER_NOW does not exist in ueventMarcel Hellwig
2012-07-09Added consumption to battery infoMarcel Hellwig
2012-07-09Added condition, for red color, when battery-time is low, namely battery is ↵Marcel Hellwig
discharging
2012-06-11Moved translation of wireless status code to text from multiple places into ↵Mateusz Loskot
single BATT_STATUS_NAME macro. It simplifies customisation of the hard-wired status text.
2012-05-25colorize battery output if remaining time below thresholdSimon Elsbrock
2012-05-15battery info: output errors in JSON in every caseMichael Stapelberg
This hopefully fixes http://bugs.i3wm.org/707
2012-04-30Implement displaying battery status on OpenBSD.Jasper Lievisse Adriaanse
2012-04-08add yajl compat codeMichael Stapelberg
2012-03-25Properly output JSON with libyajlMichael Stapelberg
2012-02-16Implement the i3bar JSON protocolMichael Stapelberg
This hardcodes all the JSON parts. Strings are not properly escaped currently. The best/easiest way to fix this is by actually using libyajl.
2011-11-26battery: implement "path" option for batteries with non-standard pathsMichael Stapelberg
2010-11-03battery: use POWER_NOW if CURRENT_NOW is not availableMichael Stapelberg
CURRENT_NOW was deprecated for some battery types in recent linux kernels (2.6.36)
2009-12-20Remove trailing whitespaceMichael Stapelberg
2009-12-20Implemented showing the time when battery is emptyAndré-Patrick Bubel
2009-10-16battery: split up %remaining into %percentage and %remaining (Thanks shatter)Michael Stapelberg
2009-10-16Actually use the format string for the battery (Thanks shatter)Michael Stapelberg
2009-10-16Implement option to use the last full capacity instead of the design capacityMichael Stapelberg
2009-10-11Breaks configfiles! Major refactoring of i3status, see belowMichael Stapelberg
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.