]>
git.madduck.net Git - etc/awesome.git/commitdiff
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (parent:
819600e )
end
bat.batteries = args.batteries or (args.battery and {args.battery}) or {}
end
bat.batteries = args.batteries or (args.battery and {args.battery}) or {}
+ bat.ac = args.ac or "AC0"
function bat.get_batteries()
helpers.line_callback("ls -1 " .. pspath, function(line)
function bat.get_batteries()
helpers.line_callback("ls -1 " .. pspath, function(line)
local rate_power = tonumber(helpers.first_line(bstr .. "/power_now"))
-- energy_now(P)[uWh], charge_now(I)[uAh]
local rate_power = tonumber(helpers.first_line(bstr .. "/power_now"))
-- energy_now(P)[uWh], charge_now(I)[uAh]
- local energy_now = tonumber(helpers.first_line(bstr .. "/energy_now") or
- helpers.first_line(bstr .. "/charge_now"))
+ local energy_now = tonumber(helpers.first_line(bstr .. "/energy_now") or
+ helpers.first_line(bstr .. "/charge_now"))
-- energy_full(P)[uWh], charge_full(I)[uAh]
-- energy_full(P)[uWh], charge_full(I)[uAh]
- local energy_full = tonumber(helpers.first_line(bstr .. "/energy_full") or
- helpers.first_line(bstr .. "/charge_full"))
+ local energy_full = tonumber(helpers.first_line(bstr .. "/energy_full") or
+ helpers.first_line(bstr .. "/charge_full"))
local energy_percentage = tonumber(helpers.first_line(bstr .. "/capacity")) or
math.floor((energy_now / energy_full) * 100)
local energy_percentage = tonumber(helpers.first_line(bstr .. "/capacity")) or
math.floor((energy_now / energy_full) * 100)