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.
In Lua 5.2 io.lines() has to be used to iterate until EOF, otherwise
the fd will not be closed and eventually tons of naughty messages
will start to pop up saying that no more fd can be opened.
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Now that we are so nice to provide default frequency values check if
frequency exists before calculating voltage, not to screw up *those*
default values.
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
In some cases not all cpu informations will be provided.
(ex. in virtual machines)
Therefore default to "N/A".
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Since Linux 3.0 most if not all people have temp1_input file missing,
so default to temp2_input. But also allow an optional third argument
to change to yet another file to avoid this kind of problem in the
future.
If the battery state change from charging to full,
power_now is reseted to zero for a little time.
This cause division by zero, which was visible as a very big negative
number because of the behaviour of string.format.
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
In cpufreq widget, governor char is the same for ondemand and
conservative which makes it impossible to overload symbols to
different values for these two governors in a format function.
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
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.