From 798036e4452cbd1001fec48d27777dc697c42971 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Thu, 6 Aug 2009 21:59:12 +0200 Subject: [PATCH] Changed fs widget type description. --- README | 14 +++++++------- fs.lua | 2 +- init.lua | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README b/README index 111e104..d7305d6 100644 --- a/README +++ b/README @@ -110,7 +110,7 @@ vicious.widgets.mem - provides RAM and Swap usage statistics vicious.widgets.fs - - provides usage statistics for requested mount points + - provides file system disk space usage vicious.widgets.dio - provides I/O statistics for requested storage devices @@ -191,7 +191,7 @@ table with the values otherwise inserted into the format string as its second argument, and should return the text to be used for the widget. Example widget - mpdwidget = widget({ type = 'textbox', name = 'mpdwidget'}) + mpdwidget = widget({ type = 'textbox', name = 'mpdwidget' }) vicious.register(mpdwidget,vicious.widgets.mpd, function (widget, args) if args[1] == "Stopped" then @@ -218,24 +218,24 @@ MPD widget Memory widget memwidget = widget({ type = 'textbox', name = 'memwidget' }) - vicious.register(memwidget, vicious.widgets.mem, '$1 ($2MB/$3MB)', 1) + vicious.register(memwidget, vicious.widgets.mem, '$1 ($2MB/$3MB)', 10) - - executed every second, appends "MB" to 2nd and 3rd argument + - executed every 10 seconds, appends "MB" to 2nd and 3rd argument File system widget fswidget = widget({ type = 'progressbar',name = 'fswidget' }) -- configure the progressbar and bar properties, then register with: vicious.register(fswidget, vicious.widgets.fs, '${/home usep}', 120, fswidget) - - executed every 120 seconds, requests the value of the ${home usep} - key and feeds the "fswidget" progressbar + - executed every 120 seconds, requests the value of the ${/home usep} + key (/home usage in percent) and feeds the "fswidget" progressbar HDD temperature widget hddtempwidget = widget({ type = 'textbox', name = 'hddtempwidget' }) vicious.register(hddtempwidget, vicious.widgets.hddtemp, '${/dev/sda}°C', 240) - executed every 240 seconds, requests the temperature level of the - ${/dev/sda} disk/key and appends "°C" to the returned value, does + ${/dev/sda} key/disk and appends "°C" to the returned value, does not provide the port argument so it fallbacks to default Battery widget diff --git a/fs.lua b/fs.lua index 494e6b0..055bf42 100644 --- a/fs.lua +++ b/fs.lua @@ -9,7 +9,7 @@ local setmetatable = setmetatable -- }}} --- FS: provides usage statistics for requested mount points +-- FS: provides file system disk space usage module("vicious.fs") diff --git a/init.lua b/init.lua index cd41a39..f9eabd5 100644 --- a/init.lua +++ b/init.lua @@ -246,7 +246,7 @@ function update(widget, reg, disablecache) c.time = t c.data = reg.type(reg.format, reg.warg) end - + data = c.data else data = reg.type(reg.format, reg.warg) @@ -259,7 +259,7 @@ function update(widget, reg, disablecache) data = reg.format(widget, data) end end - + if reg.field == nil then widget.text = data elseif widget.plot_data_add ~= nil then