Ignore:
Timestamp:
09/01/10 15:49:58 (21 months ago)
Author:
Luper Rouch luper.rouch@…>
Children:
e7bf52cedc5410a62a59bfc22946d72454d3a5ac
Parents:
cadb525021a211c188d97fc9f03e59b3534cf108
git-author:
Luper Rouch <luper.rouch@…> (09/01/10 15:48:42)
git-committer:
Luper Rouch luper.rouch@…> (09/01/10 15:49:58)
Message:

update config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • various/config/awesome/vicious/widgets/bat.lua

    r37bbbc7 r909bc1c  
    77local tonumber = tonumber 
    88local setmetatable = setmetatable 
    9 local string = { format = string.format } 
     9local string = {  
     10    format = string.format,  
     11    match = string.match, 
     12    find = string.find 
     13} 
     14local io = { open = io.open } 
    1015local helpers = require("vicious.helpers") 
    1116local math = { 
     
    7479    local time = string.format("%02d:%02d", hoursleft, minutesleft) 
    7580 
    76     return {state, percent, time} 
     81    -- Get charge/discharge rate 
     82    local batstate = io.open("/proc/acpi/battery/"..warg.."/state"):read("*all") 
     83    local charge_rate = string.match(batstate, "present rate: +([0-9]+ mW)") 
     84 
     85    return {state, percent, time, charge_rate} 
    7786end 
    7887-- }}} 
Note: See TracChangeset for help on using the changeset viewer.