Changed fs widget type description.
This commit is contained in:
parent
8d59a01cf6
commit
798036e445
14
README
14
README
|
@ -110,7 +110,7 @@ vicious.widgets.mem
|
||||||
- provides RAM and Swap usage statistics
|
- provides RAM and Swap usage statistics
|
||||||
|
|
||||||
vicious.widgets.fs
|
vicious.widgets.fs
|
||||||
- provides usage statistics for requested mount points
|
- provides file system disk space usage
|
||||||
|
|
||||||
vicious.widgets.dio
|
vicious.widgets.dio
|
||||||
- provides I/O statistics for requested storage devices
|
- 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.
|
second argument, and should return the text to be used for the widget.
|
||||||
|
|
||||||
Example widget
|
Example widget
|
||||||
mpdwidget = widget({ type = 'textbox', name = 'mpdwidget'})
|
mpdwidget = widget({ type = 'textbox', name = 'mpdwidget' })
|
||||||
vicious.register(mpdwidget,vicious.widgets.mpd,
|
vicious.register(mpdwidget,vicious.widgets.mpd,
|
||||||
function (widget, args)
|
function (widget, args)
|
||||||
if args[1] == "Stopped" then
|
if args[1] == "Stopped" then
|
||||||
|
@ -218,24 +218,24 @@ MPD widget
|
||||||
|
|
||||||
Memory widget
|
Memory widget
|
||||||
memwidget = widget({ type = 'textbox', name = 'memwidget' })
|
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
|
File system widget
|
||||||
fswidget = widget({ type = 'progressbar',name = 'fswidget' })
|
fswidget = widget({ type = 'progressbar',name = 'fswidget' })
|
||||||
-- configure the progressbar and bar properties, then register with:
|
-- configure the progressbar and bar properties, then register with:
|
||||||
vicious.register(fswidget, vicious.widgets.fs, '${/home usep}', 120, fswidget)
|
vicious.register(fswidget, vicious.widgets.fs, '${/home usep}', 120, fswidget)
|
||||||
|
|
||||||
- executed every 120 seconds, requests the value of the ${home usep}
|
- executed every 120 seconds, requests the value of the ${/home usep}
|
||||||
key and feeds the "fswidget" progressbar
|
key (/home usage in percent) and feeds the "fswidget" progressbar
|
||||||
|
|
||||||
HDD temperature widget
|
HDD temperature widget
|
||||||
hddtempwidget = widget({ type = 'textbox', name = 'hddtempwidget' })
|
hddtempwidget = widget({ type = 'textbox', name = 'hddtempwidget' })
|
||||||
vicious.register(hddtempwidget, vicious.widgets.hddtemp, '${/dev/sda}°C', 240)
|
vicious.register(hddtempwidget, vicious.widgets.hddtemp, '${/dev/sda}°C', 240)
|
||||||
|
|
||||||
- executed every 240 seconds, requests the temperature level of the
|
- 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
|
not provide the port argument so it fallbacks to default
|
||||||
|
|
||||||
Battery widget
|
Battery widget
|
||||||
|
|
2
fs.lua
2
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")
|
module("vicious.fs")
|
||||||
|
|
||||||
|
|
||||||
|
|
4
init.lua
4
init.lua
|
@ -246,7 +246,7 @@ function update(widget, reg, disablecache)
|
||||||
c.time = t
|
c.time = t
|
||||||
c.data = reg.type(reg.format, reg.warg)
|
c.data = reg.type(reg.format, reg.warg)
|
||||||
end
|
end
|
||||||
|
|
||||||
data = c.data
|
data = c.data
|
||||||
else
|
else
|
||||||
data = reg.type(reg.format, reg.warg)
|
data = reg.type(reg.format, reg.warg)
|
||||||
|
@ -259,7 +259,7 @@ function update(widget, reg, disablecache)
|
||||||
data = reg.format(widget, data)
|
data = reg.format(widget, data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if reg.field == nil then
|
if reg.field == nil then
|
||||||
widget.text = data
|
widget.text = data
|
||||||
elseif widget.plot_data_add ~= nil then
|
elseif widget.plot_data_add ~= nil then
|
||||||
|
|
Loading…
Reference in New Issue