aboutsummaryrefslogtreecommitdiff
path: root/bat.lua
AgeCommit message (Collapse)AuthorFiles
2010-03-06volume: added real mute supportAdrian C. (anrxc)1
Widge type returns 1st value as the volume level and 2nd as the mute state of the requested channel represented as a symbol.
2010-02-20bat: added a note about Apple PMU and ACPI/procfsAdrian C. (anrxc)1
2010-01-02vicious: update copyrightAdrian C. (anrxc)1
2009-11-11Cleanup widgets that use pathtotable helperAdrian C. (anrxc)1
2009-11-11bat: widget rewritten for sysfsAdrian C. (anrxc)1
This also means that it replaces batsys, and we are left with only one, universal, battery widget.
2009-11-10batsys: import battery widget that uses sysfsAdrian C. (anrxc)1
Initial widget code was sent by Benedikt Sauer. After some cleanup it is ready to go into master. It uses data exposed trough /sys and it is used in the exact same way as the bat widget (and /proc). This widget will replace batat and acpitool, it will be moved to contrib and retired.
2009-11-04De-obfuscate e-mail addressAdrian C. (anrxc)1
2009-10-26Ensure returned numbers are of type numberAdrian C. (anrxc)1
Thanks to Felix for bringing this to my attention. Obviously there was already a safety net for feeding progressbars and graphs... and while this makes for a good coding practice it's not a big deal. We have widgets of type textbox for one, and a lot of string concatenation happens. Strings are formatted, markup is applied...
2009-10-15bat: better returns when handling insufficient dataAdrian C. (anrxc)1
If we return "N/A" like we usually do then format string "$1$2" would look like "N/AN/A". If "/" is returned a progressbar could be broken. Now returns are: symbol for state "unknown", 0 for battery charge, N/A for remaining time.
2009-10-15bat: better fix for ACPI, from bioe007Adrian C. (anrxc)1
Previous commit had redudant string > number conversions, and only covered one scenario - when battery is charged. bioe007 suggested to use math.min. Now lets explain why this is needed. Some (lousy) batteries report "remaining capacity" higher than "last full capacity" when AC is connected. That leads to battery charges like "160%".
2009-10-15bat: quick fix for broken BAT/ACPI implementationsAdrian C. (anrxc)1
2009-10-04bat: added a handler for incompetent usersAdrian C. (anrxc)1
A lot of people expect widgets like this one to auto-magically work, and somehow don't understand that *they* need to make sure there is a source of information. Is ACPI module loaded? Is battery info exposed in the same place that widget expects by default? You need to answer those questions before loading the widget and sending me "bug" reports.
2009-10-04Removed some useless else statementsAdrian C. (anrxc)1
2009-10-02bat: coding style changesAdrian C. (anrxc)1
2009-09-29Rewrote all headersAdrian C. (anrxc)1
2009-09-14General cleanupAdrian C. (anrxc)1
2009-08-07All worker functions are local.Adrian C. (anrxc)1
2009-08-01Make all widgets return their worker functions when called.Adrian C. (anrxc)1
2009-07-31Use utf symbols for some bat states. Mention LuaFileSystem in mdir.luaAdrian C. (anrxc)1
2009-07-30Coding style fixes in battery widgets.Adrian C. (anrxc)1
2009-07-30Added a new, standalone, battery widget.Adrian C. (anrxc)1
The widget reads /proc/acpi/battery/*/{info,state} and doesn't require an external utility like 'acpi' or 'acpitool'. It returns state, charge and remaining time information, just like the old bat (now batat) widget. Using /sys/class/power_supply we would need to open much more file descriptors so we use /proc for now.
2009-07-29Battery widget moved to batat.lua in preparation for a new bat widget.Adrian C. (anrxc)1
It's time for a standalone battery widget that reads /proc/acpi/battery/*/{info,state} alone. However the old battery widget that uses 'acpitool' will not be deleted, let it serve as an alternative widget as a convenience. Some might also prefer it over reading multiple files in /proc
2009-07-29Import of vicious source tree.v1.0.0Adrian C. (anrxc)1
Vicious is a modular widget library for 'awesome' window manager, derived from the 'Wicked' widget library. Summary of changes: * Original wicked code modularized * Widgets ported from Wicked: - CPU, MEM, FS, NET, Date, Uptime, MPD * CPU widget rewritten, uses pattern matching * MEM widget rewritten, uses pattern matching - Swap widget merged with MEM widget type * FS widget rewritten, uses pattern matching - Also fixed padding in the process * NET widget rewritten, uses pattern matching * MPD widget rewritten, a bit more versatile * Removed deprecated helper functions * Widgets written for Vicious: - Thermal, Battery, Mbox, OrgMode, Volume, Entropy, Disk I/O, System Load, Wireless, Pacman, Maildir