aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorArvydas Sidorenko <asido4@gmail.com>2012-06-15 20:48:17 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2012-06-18 01:27:53 +0200
commit8e35a983bf24f6f90df4630b2b55409f0ca1d213 (patch)
treebec2a7d44b7994c299e82c2348740a11ffeb71a6 /contrib
parent41cc2c0e27e6a0860d21754ed9d13f6cd61254ac (diff)
downloadvicious-legacy-8e35a983bf24f6f90df4630b2b55409f0ca1d213.tar.xz
Ported vicious.contrib to lua 5.2
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com> Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/batacpi.lua5
-rw-r--r--contrib/batpmu.lua5
-rw-r--r--contrib/batproc.lua5
-rw-r--r--contrib/dio.lua5
-rw-r--r--contrib/init.lua5
-rw-r--r--contrib/mpc.lua5
-rw-r--r--contrib/net.lua5
-rw-r--r--contrib/netcfg.lua5
-rw-r--r--contrib/ossvol.lua5
-rw-r--r--contrib/pop.lua5
-rw-r--r--contrib/pulse.lua9
-rw-r--r--contrib/rss.lua5
-rw-r--r--contrib/sensors.lua5
13 files changed, 41 insertions, 28 deletions
diff --git a/contrib/batacpi.lua b/contrib/batacpi.lua
index 62156fd..fc7d54b 100644
--- a/contrib/batacpi.lua
+++ b/contrib/batacpi.lua
@@ -13,7 +13,8 @@ local string = { match = string.match }
-- Batacpi: provides state, charge, and remaining time for all batteries using acpitool
-module("vicious.contrib.batacpi")
+-- vicious.contrib.batacpi
+local batacpi = {}
-- {{{ Battery widget type
@@ -48,4 +49,4 @@ local function worker(format)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(batacpi, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/batpmu.lua b/contrib/batpmu.lua
index e84295e..8c73d93 100644
--- a/contrib/batpmu.lua
+++ b/contrib/batpmu.lua
@@ -20,7 +20,8 @@ local string = {
-- Batpmu: provides state, charge and remaining time for a requested battery using PMU
-module("vicious.contrib.batpmu")
+-- vicious.contrib.batpmu
+local batpmu = {}
-- {{{ Battery widget type
@@ -75,4 +76,4 @@ local function worker(format, batid)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(batpmu, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/batproc.lua b/contrib/batproc.lua
index dac4d44..8acf005 100644
--- a/contrib/batproc.lua
+++ b/contrib/batproc.lua
@@ -20,7 +20,8 @@ local string = {
-- Batproc: provides state, charge, and remaining time for a requested battery using procfs
-module("vicious.contrib.batproc")
+-- vicious.contrib.batproc
+local batproc = {}
-- {{{ Battery widget type
@@ -82,4 +83,4 @@ local function worker(format, batid)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(batproc, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/dio.lua b/contrib/dio.lua
index 40c4cad..5639bc8 100644
--- a/contrib/dio.lua
+++ b/contrib/dio.lua
@@ -13,7 +13,8 @@ local helpers = require("vicious.helpers")
-- Disk I/O: provides I/O statistics for requested storage devices
-module("vicious.contrib.dio")
+-- vicious.contrib.dio
+local dio = {}
-- Initialize function tables
@@ -69,4 +70,4 @@ local function worker(format, disk)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(dio, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/init.lua b/contrib/init.lua
index 7fee3b3..d30b33d 100644
--- a/contrib/init.lua
+++ b/contrib/init.lua
@@ -10,8 +10,9 @@ local setmetatable = setmetatable
local wrequire = require("vicious.helpers").wrequire
-- Vicious: widgets for the awesome window manager
-module("vicious.contrib")
+-- vicious.contrib
+local contrib = {}
-- }}}
-- Load modules at runtime as needed
-setmetatable(_M, { __index = wrequire })
+return setmetatable(contrib, { __index = wrequire })
diff --git a/contrib/mpc.lua b/contrib/mpc.lua
index 8f1f0a9..60974c0 100644
--- a/contrib/mpc.lua
+++ b/contrib/mpc.lua
@@ -14,7 +14,8 @@ local helpers = require("vicious.helpers")
-- Mpc: provides the currently playing song in MPD
-module("vicious.contrib.mpc")
+-- vicious.contrib.mpc
+local mpc = {}
-- {{{ MPC widget type
@@ -44,4 +45,4 @@ local function worker(format, warg)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(mpc, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/net.lua b/contrib/net.lua
index 8f18604..5e6ba93 100644
--- a/contrib/net.lua
+++ b/contrib/net.lua
@@ -17,7 +17,8 @@ local helpers = require("vicious.helpers")
-- Net: provides usage statistics for all network interfaces
-module("vicious.contrib.net")
+-- vicious.contrib.net
+local net = {}
-- Initialise function tables
@@ -135,4 +136,4 @@ local function worker(format, tignorelist)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(net, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/netcfg.lua b/contrib/netcfg.lua
index fc22e8d..f2c0d52 100644
--- a/contrib/netcfg.lua
+++ b/contrib/netcfg.lua
@@ -11,7 +11,8 @@ local table = { insert = table.insert }
-- Netcfg: provides active netcfg network profiles
-module("vicious.contrib.netcfg")
+-- vicious.contrib.netcfg
+local netcfg = {}
-- {{{ Netcfg widget type
@@ -31,4 +32,4 @@ local function worker(format)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(netcfg, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/ossvol.lua b/contrib/ossvol.lua
index eb14cb8..a52316c 100644
--- a/contrib/ossvol.lua
+++ b/contrib/ossvol.lua
@@ -12,7 +12,8 @@ local string = { match = string.match }
-- Ossvol: provides volume levels of requested OSS mixers
-module("vicious.contrib.ossvol")
+-- vicious.contrib.ossvol
+local ossvol = {}
-- {{{ Volume widget type
@@ -50,4 +51,4 @@ local function worker(format, warg)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(ossvol, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/pop.lua b/contrib/pop.lua
index 78e0bcb..0ea041b 100644
--- a/contrib/pop.lua
+++ b/contrib/pop.lua
@@ -19,7 +19,8 @@ end)
-- POP: provides the count of new messages in a POP3 mailbox
-module("vicious.contrib.pop")
+-- vicious.contrib.pop
+local pop = {}
-- {{{ POP3 count widget type
@@ -51,4 +52,4 @@ local function worker(format, warg)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(pop, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/pulse.lua b/contrib/pulse.lua
index 4b0260f..8b3298b 100644
--- a/contrib/pulse.lua
+++ b/contrib/pulse.lua
@@ -24,7 +24,8 @@ local math = {
-- Pulse: provides volume levels of requested pulseaudio sinks and methods to change them
-module("vicious.contrib.pulse")
+-- vicious.contrib.pulse
+local pulse = {}
-- {{{ Helper function
local function pacmd(args)
@@ -79,7 +80,7 @@ end
-- }}}
-- {{{ Volume control helper
-function add(percent, sink)
+function pulse.add(percent, sink)
sink = get_sink_name(sink)
if sink == nil then return end
@@ -96,7 +97,7 @@ function add(percent, sink)
return os.execute(cmd)
end
-function toggle(sink)
+function pulse.toggle(sink)
sink = get_sink_name(sink)
if sink == nil then return end
@@ -111,4 +112,4 @@ function toggle(sink)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(pulse, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/rss.lua b/contrib/rss.lua
index bba1bf2..dcf5cc7 100644
--- a/contrib/rss.lua
+++ b/contrib/rss.lua
@@ -14,7 +14,8 @@ local setmetatable = setmetatable
-- RSS: provides latest world news
-module("vicious.contrib.rss")
+-- vicious.contrib.rss
+local rss = {}
-- {{{ RSS widget type
@@ -64,4 +65,4 @@ local function worker(format, input)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(rss, { __call = function(_, ...) return worker(...) end })
diff --git a/contrib/sensors.lua b/contrib/sensors.lua
index 45c7d9a..3ddeb01 100644
--- a/contrib/sensors.lua
+++ b/contrib/sensors.lua
@@ -16,7 +16,8 @@ local string = {
-- Sensors: provides access to lm_sensors data
-module("vicious.contrib.sensors")
+-- vicious.contrib.sensors
+local sensors = {}
-- {{{ Split helper function
@@ -65,4 +66,4 @@ local function worker(format, warg)
end
-- }}}
-setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+return setmetatable(sensors, { __call = function(_, ...) return worker(...) end })