diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-14 01:55:33 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-14 01:55:33 +0100 |
commit | 237470c8f45190b213e3a173ce6ae1a74b3e11fe (patch) | |
tree | 7f53c8144761947d4bde20715bcad34f4be0d6c0 /init.lua | |
parent | 9a82d4113a8271b7dfc7506f2b07379e3ede89a8 (diff) | |
download | vicious-legacy-237470c8f45190b213e3a173ce6ae1a74b3e11fe.tar.xz |
API: transform widgets namespace table to a directory
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 54 |
1 files changed, 5 insertions, 49 deletions
@@ -6,71 +6,27 @@ -- * (c) 2009, Lucas de Vries <lucas@glacicle.com> --------------------------------------------------- --- {{{ Grab environment +-- {{{ Setup environment local type = type local pairs = pairs local tonumber = tonumber -local helpers = require("vicious.helpers") local capi = { timer = timer } local os = { time = os.time } local table = { insert = table.insert, remove = table.remove } --- }}} - - --- {{{ Configure widgets -require("vicious.cpu") -require("vicious.cpuinf") -require("vicious.cpufreq") -require("vicious.thermal") -require("vicious.uptime") -require("vicious.bat") -require("vicious.mem") -require("vicious.os") -require("vicious.fs") -require("vicious.dio") -require("vicious.hddtemp") -require("vicious.net") -require("vicious.wifi") -require("vicious.mbox") -require("vicious.mboxc") -require("vicious.mdir") -require("vicious.gmail") -require("vicious.entropy") -require("vicious.org") -require("vicious.pkg") -require("vicious.mpd") -require("vicious.volume") -require("vicious.weather") -require("vicious.date") --- }}} +require("vicious.helpers") +require("vicious.widgets") -- Vicious: widgets for the awesome window manager module("vicious") --- {{{ Initialize tables +-- Initialize tables local timers = {} local registered = {} local widget_cache = {} - --- Initialize the function table -widgets = {} --- }}} - --- {{{ Widget types -for i, w in pairs(_M) do - -- Ensure we don't call ourselves - if w and w ~= _M and type(w) == "table" then - -- Ignore the function table and helpers - if i ~= "widgets" and i ~= "helpers" then - -- Place widgets in the namespace table - widgets[i] = w - end - end -end -- }}} @@ -173,7 +129,7 @@ end -- }}} --- {{{ Exposed functions +-- {{{ Global functions -- {{{ Register a widget function register(widget, wtype, format, timer, warg) local reg = {} |