diff options
-rw-r--r-- | bat.lua | 3 | ||||
-rw-r--r-- | batat.lua | 3 | ||||
-rw-r--r-- | cpu.lua | 3 | ||||
-rw-r--r-- | date.lua | 3 | ||||
-rw-r--r-- | dio.lua | 3 | ||||
-rw-r--r-- | entropy.lua | 3 | ||||
-rw-r--r-- | fs.lua | 3 | ||||
-rw-r--r-- | load.lua | 3 | ||||
-rw-r--r-- | mbox.lua | 3 | ||||
-rw-r--r-- | mboxc.lua | 3 | ||||
-rw-r--r-- | mdir.lua | 3 | ||||
-rw-r--r-- | mem.lua | 3 | ||||
-rw-r--r-- | mpd.lua | 5 | ||||
-rw-r--r-- | net.lua | 3 | ||||
-rw-r--r-- | org.lua | 3 | ||||
-rw-r--r-- | pacman.lua | 3 | ||||
-rw-r--r-- | thermal.lua | 3 | ||||
-rw-r--r-- | uptime.lua | 3 | ||||
-rw-r--r-- | volume.lua | 3 | ||||
-rw-r--r-- | weather.lua | 3 | ||||
-rw-r--r-- | wifi.lua | 3 |
21 files changed, 64 insertions, 1 deletions
@@ -6,6 +6,7 @@ -- {{{ Grab environment local tonumber = tonumber local io = { open = io.open } +local setmetatable = setmetatable local math = { floor = math.floor } local string = { find = string.find, @@ -77,3 +78,5 @@ function worker(format, batid) end end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { popen = io.popen } +local setmetatable = setmetatable local table = { insert = table.insert } -- }}} @@ -46,3 +47,5 @@ function worker(format) return battery_info end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -8,6 +8,7 @@ local type = type local pairs = pairs local ipairs = ipairs local io = { open = io.open } +local setmetatable = setmetatable local math = { floor = math.floor } local table = { insert = table.insert } local helpers = require("vicious.helpers") @@ -93,3 +94,5 @@ function worker(format, padding) return cpu_usage end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -5,6 +5,7 @@ -- {{{ Grab environment local os = { date = os.date } +local setmetatable = setmetatable -- }}} @@ -22,3 +23,5 @@ function worker(format) end end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -7,6 +7,7 @@ local type = type local ipairs = ipairs local io = { open = io.open } +local setmetatable = setmetatable local math = { floor = math.floor } local table = { insert = table.insert } -- }}} @@ -71,3 +72,5 @@ function worker(format, disk) return disk_usage end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) diff --git a/entropy.lua b/entropy.lua index 43bdb80..a41fb38 100644 --- a/entropy.lua +++ b/entropy.lua @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { open = io.open } +local setmetatable = setmetatable local math = { floor = math.floor } local string = { format = string.format } -- }}} @@ -35,3 +36,5 @@ function worker(format, poolsize) return {ent_avail, ent_avail_percent} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -6,6 +6,7 @@ -- {{{ Grab environment local type = type local io = { popen = io.popen } +local setmetatable = setmetatable local helpers = require("vicious.helpers") -- }}} @@ -54,3 +55,5 @@ function worker(format, padding) return args end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { open = io.open } +local setmetatable = setmetatable -- }}} @@ -26,3 +27,5 @@ function worker(format) return {avg1, avg5, avg15} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { open = io.open } +local setmetatable = setmetatable local string = { gfind = string.gfind } local helpers = require("vicious.helpers") -- }}} @@ -43,3 +44,5 @@ function worker(format, mbox) end end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { open = io.open } +local setmetatable = setmetatable local string = { find = string.find } -- }}} @@ -55,3 +56,5 @@ function worker(format, mbox) return {total, old, new} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -6,6 +6,7 @@ -- {{{ Grab environment local io = { popen = io.popen } +local setmetatable = setmetatable -- }}} @@ -42,3 +43,5 @@ function worker(format, mdir) return {newcount, curcount} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -7,6 +7,7 @@ local type = type local tonumber = tonumber local io = { open = io.open } +local setmetatable = setmetatable local math = { floor = math.floor } local helpers = require("vicious.helpers") -- }}} @@ -74,3 +75,5 @@ function worker(format, padding) swap_usepercent, swap_inuse, swap_total, swap_free} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { popen = io.popen } +local setmetatable = setmetatable local helpers = require("vicious.helpers") -- }}} @@ -14,7 +15,7 @@ module("vicious.mpd") -- {{{ MPD widget type -function worker() +function worker(format) -- This one is as simple as they come. Using sockets or expanding -- it is a lost cause since there are already a few MPD Lua libs -- written for awesome. Use them. @@ -40,3 +41,5 @@ function worker() return {nowplaying} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -7,6 +7,7 @@ local tonumber = tonumber local os = { time = os.time } local io = { open = io.open } +local setmetatable = setmetatable local math = { floor = math.floor } local helpers = require("vicious.helpers") -- }}} @@ -113,3 +114,5 @@ function worker(format, padding) return args end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -6,6 +6,7 @@ -- {{{ Grab environment local io = { open = io.open } +local setmetatable = setmetatable local string = { find = string.find } local os = { time = os.time, @@ -68,3 +69,5 @@ function worker(format, files) return {count.past, count.today, count.soon, count.future} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -6,6 +6,7 @@ -- {{{ Grab environment local tonumber = tonumber local io = { popen = io.popen } +local setmetatable = setmetatable -- }}} @@ -36,3 +37,5 @@ function worker(format) return {updates} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) diff --git a/thermal.lua b/thermal.lua index 02b1f54..8d4057a 100644 --- a/thermal.lua +++ b/thermal.lua @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { open = io.open } +local setmetatable = setmetatable -- }}} @@ -25,3 +26,5 @@ function worker(format, thermal_zone) return {temperature} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -6,6 +6,7 @@ -- {{{ Grab environment local tonumber = tonumber local io = { open = io.open } +local setmetatable = setmetatable local math = { floor = math.floor } local helpers = require("vicious.helpers") -- }}} @@ -49,3 +50,5 @@ function worker(format, padding) return {total_uptime, uptime_days, uptime_hours, uptime_minutes, uptime_seconds} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { popen = io.popen } +local setmetatable = setmetatable local string = { match = string.match } -- }}} @@ -31,3 +32,5 @@ function worker(format, channel) return {volume_level} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) diff --git a/weather.lua b/weather.lua index e14c0ed..c8dd5ac 100644 --- a/weather.lua +++ b/weather.lua @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { popen = io.popen } +local setmetatable = setmetatable local math = { floor = math.floor } local string = { match = string.match } -- }}} @@ -73,3 +74,5 @@ function worker(format, station) return weather end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { popen = io.popen } +local setmetatable = setmetatable local string = { find = string.find, match = string.match @@ -60,3 +61,5 @@ function worker(format, iface) return winfo end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) |