Changeset 909bc1c77c7b14ddb74df5eb488a2cd9288e0327 for various/config/awesome/vicious/widgets/bat.lua
- Timestamp:
- 09/01/10 15:49:58 (21 months ago)
- 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)
- File:
-
- 1 edited
-
various/config/awesome/vicious/widgets/bat.lua (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
various/config/awesome/vicious/widgets/bat.lua
r37bbbc7 r909bc1c 7 7 local tonumber = tonumber 8 8 local setmetatable = setmetatable 9 local string = { format = string.format } 9 local string = { 10 format = string.format, 11 match = string.match, 12 find = string.find 13 } 14 local io = { open = io.open } 10 15 local helpers = require("vicious.helpers") 11 16 local math = { … … 74 79 local time = string.format("%02d:%02d", hoursleft, minutesleft) 75 80 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} 77 86 end 78 87 -- }}}
Note: See TracChangeset
for help on using the changeset viewer.
