Modern batteries should expose information about their design capacity
which we can compare to current capacity and deduce how much 'wear'
the battery got and expose that as a negative value percentage.
Feature sent in August took a while to convince the maintainer many
modern batteries provide this information.
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Vicious can be used stand-alone, or to feed widgets in window managers
beside awesome. So why not provide it to a few Ion, or WMII, or i3 or
<foobar> users. Lua is the best thing since sliced bread.
With the Lua 5.2 port we change the way vicious is loaded as a module,
so that it remains backwards compatible with Lua 5.1 users. Also added
the author of the Lua 5.2 port to the contributors list.
There's no more need to edit init files and manually disable widgets.
Signed-off-by: Joerg T. (Mic92) <jthalheim@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Old dio.lua was moved to contrib. New one is used like CPU widget is,
request the device or parition in the format argument, {sda read_mb}
as an example. New widget doesn't provide scheduler information, but I
don't know anyone who used that. If you think this is wrong let me
know.
The os.time() call should not be passed as an argument it self,
because of a chance it will be stored internally and so we would
always get the same time. Instead we can pass time offsets in seconds,
i.e. to go 6 hours forward we can use the widget argument 21600, to go
6 hours back we use -21600 instead.
Contrib should be better known because of the extra widgets it
contains. While the vicious-fbsd branch by Richard Kolkovich was
already added to the vicious home page and needs more exposure.
Widget type uses curl now, like all other types accessing network
resources (until, if ever, we switch to luasocket). Where previously
only the currently playing song was returned now you can access these
keys: {volume}, {state}, {Artist}, {Title}, {Album}, {Genre}. You can
provide an optional table argument to change password, host or port.
Login information is now kept in the ~/.netrc file, which should be
readable only by the owner. This should solve futher problems with
unquoted characters addressed in the last commit. The format of the
~/.netrc file is as follows (also documented in the README):
machine mail.google.com login user password pass