diff options
-rw-r--r-- | bat.lua | 2 | ||||
-rw-r--r-- | batat.lua | 2 | ||||
-rw-r--r-- | cpu.lua | 2 | ||||
-rw-r--r-- | cpufreq.lua | 2 | ||||
-rw-r--r-- | cpuinf.lua | 2 | ||||
-rw-r--r-- | date.lua | 2 | ||||
-rw-r--r-- | dio.lua | 2 | ||||
-rw-r--r-- | entropy.lua | 2 | ||||
-rw-r--r-- | fs.lua | 2 | ||||
-rw-r--r-- | hddtemp.lua | 2 | ||||
-rw-r--r-- | load.lua | 2 | ||||
-rw-r--r-- | mbox.lua | 2 | ||||
-rw-r--r-- | mboxc.lua | 2 | ||||
-rw-r--r-- | mdir.lua | 2 | ||||
-rw-r--r-- | mem.lua | 2 | ||||
-rw-r--r-- | mpd.lua | 2 | ||||
-rw-r--r-- | net.lua | 2 | ||||
-rw-r--r-- | org.lua | 2 | ||||
-rw-r--r-- | pacman.lua | 2 | ||||
-rw-r--r-- | thermal.lua | 2 | ||||
-rw-r--r-- | uptime.lua | 2 | ||||
-rw-r--r-- | volume.lua | 2 | ||||
-rw-r--r-- | weather.lua | 2 | ||||
-rw-r--r-- | wifi.lua | 2 |
24 files changed, 24 insertions, 24 deletions
@@ -21,7 +21,7 @@ module("vicious.bat") -- {{{ Battery widget type -function worker(format, batid) +local function worker(format, batid) -- Initialise tables local battery_state = { ["full"] = "↯", @@ -15,7 +15,7 @@ module("vicious.batat") -- {{{ Battery widget type -function worker(format) +local function worker(format) -- Initialise tables local battery_info = {} local battery_state = { @@ -22,7 +22,7 @@ local cpu_total = {} local cpu_active = {} -- {{{ CPU widget type -function worker(format) +local function worker(format) -- Get /proc/stat local f = io.open("/proc/stat") local cpu_lines = {} diff --git a/cpufreq.lua b/cpufreq.lua index 550bba3..ef0fbc0 100644 --- a/cpufreq.lua +++ b/cpufreq.lua @@ -18,7 +18,7 @@ module("vicious.cpufreq") -- {{{ CPU frequency widget type -function worker(format, cpuid) +local function worker(format, cpuid) -- Initialise tables --local governor_state = { -- ["ondemand"] = "↯", @@ -15,7 +15,7 @@ module("vicious.cpuinf") -- {{{ CPU Information widget type -function worker(format) +local function worker(format) -- Initialise variables cpu_id = nil @@ -14,7 +14,7 @@ module("vicious.date") -- {{{ Date widget type -function worker(format) +local function worker(format) -- Get format if format == nil then return os.date() @@ -22,7 +22,7 @@ local disk_usage = {} local disk_total = {} -- {{{ Disk I/O widget type -function worker(format, disk) +local function worker(format, disk) -- Get /proc/diskstats local f = io.open("/proc/diskstats") local disk_lines = {} diff --git a/entropy.lua b/entropy.lua index 33da459..1146a0e 100644 --- a/entropy.lua +++ b/entropy.lua @@ -16,7 +16,7 @@ module("vicious.entropy") -- {{{ Entropy widget type -function worker(format, poolsize) +local function worker(format, poolsize) -- Don't waste time opening the poolsize, Linux 2.6 has a default -- entropy pool of 4096-bits, if needed specify otherwise if poolsize == nil then poolsize = 4096 end @@ -14,7 +14,7 @@ module("vicious.fs") -- {{{ Filesystem widget type -function worker(format) +local function worker(format) -- Get data from df local f = io.popen("df -hP") local fs_info = {} diff --git a/hddtemp.lua b/hddtemp.lua index e703278..0cc6c20 100644 --- a/hddtemp.lua +++ b/hddtemp.lua @@ -14,7 +14,7 @@ module("vicious.hddtemp") -- {{{ HDD Temperature widget type -function worker(format, port) +local function worker(format, port) -- Fallback to default hddtemp port if port == nil then port = 7634 end @@ -14,7 +14,7 @@ module("vicious.load") -- {{{ Load widget type -function worker(format) +local function worker(format) -- Get load averages local f = io.open('/proc/loadavg') local line = f:read("*line") @@ -16,7 +16,7 @@ module("vicious.mbox") -- {{{ Mailbox widget type -function worker(format, mbox) +local function worker(format, mbox) local f = io.open(mbox) -- mbox could be huge, get a 15kb chunk from EOF -- * attachments could be much bigger than this @@ -15,7 +15,7 @@ module("vicious.mboxc") -- {{{ Mbox count widget type -function worker(format, mbox) +local function worker(format, mbox) -- Initialise counters local old = 0 local total = 0 @@ -15,7 +15,7 @@ module("vicious.mdir") -- {{{ Maildir widget type -function worker(format, mdir) +local function worker(format, mdir) -- Like with the mbox count widget, we would benefit from the -- LuaFileSystem library. However, we didn't rely on extra -- libraries to this point so we won't start now. Widgets like @@ -16,7 +16,7 @@ module("vicious.mem") -- {{{ Memory widget type -function worker(format) +local function worker(format) -- Get meminfo local f = io.open("/proc/meminfo") @@ -15,7 +15,7 @@ module("vicious.mpd") -- {{{ MPD widget type -function worker(format) +local 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. @@ -20,7 +20,7 @@ module("vicious.net") local nets = {} -- {{{ Net widget type -function worker(format) +local function worker(format) -- Get /proc/net/dev local f = io.open("/proc/net/dev") local args = {} @@ -20,7 +20,7 @@ module("vicious.org") -- {{{ OrgMode widget type -function worker(format, files) +local function worker(format, files) -- Compute delays local today = os.time{ year=os.date("%Y"), month=os.date("%m"), day=os.date("%d") } local soon = today + 24 * 3600 * 3 -- 3 days ahead is close @@ -15,7 +15,7 @@ module("vicious.pacman") -- {{{ Pacman widget type -function worker(format) +local function worker(format) -- Check if updates are available local f = io.popen("pacman -Qu") diff --git a/thermal.lua b/thermal.lua index d84d3f3..6c792e7 100644 --- a/thermal.lua +++ b/thermal.lua @@ -14,7 +14,7 @@ module("vicious.thermal") -- {{{ Thermal widget type -function worker(format, thermal_zone) +local function worker(format, thermal_zone) -- Get thermal zone local f = io.open("/proc/acpi/thermal_zone/" .. thermal_zone .. "/temperature") local line = f:read("*line") @@ -16,7 +16,7 @@ module("vicious.uptime") -- {{{ Uptime widget type -function worker(format) +local function worker(format) -- Get /proc/uptime local f = io.open("/proc/uptime") local line = f:read("*line") @@ -15,7 +15,7 @@ module("vicious.volume") -- {{{ Volume widget type -function worker(format, channel) +local function worker(format, channel) -- Get mixer data local f = io.popen("amixer get " .. channel) local mixer = f:read("*all") diff --git a/weather.lua b/weather.lua index 3dba976..17e41ac 100644 --- a/weather.lua +++ b/weather.lua @@ -16,7 +16,7 @@ module("vicious.weather") -- {{{ Weather widget type -function worker(format, station) +local function worker(format, station) -- US National Oceanic and Atmospheric Administration -- * Station codes: http://www.rap.ucar.edu/weather/surface/stations.txt local noaa = "http://weather.noaa.gov/pub/data/observations/metar/decoded/" @@ -18,7 +18,7 @@ module("vicious.wifi") -- {{{ Wireless widget type -function worker(format, iface) +local function worker(format, iface) -- Get data from iwconfig, on distributions where it is executable -- by users, and /sbin or /usr/sbin is in their path local f = io.popen("iwconfig " .. iface) |