README: mpd format function simplified
This commit is contained in:
parent
7410bc0086
commit
bc3cf45da0
13
README
13
README
|
@ -206,14 +206,13 @@ 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 return ''
|
||||||
return ''
|
else return '<span color="white">MPD:</span> '..args[1]
|
||||||
else
|
|
||||||
return ' <span color="white">MPD:</span> ' .. args[1]
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
- hides the mpd widget when there is no song playing
|
- hides the mpd widget when there is no song playing, executed every
|
||||||
|
second (the default interval)
|
||||||
|
|
||||||
|
|
||||||
Usage examples
|
Usage examples
|
||||||
|
@ -223,9 +222,9 @@ to a wibox in order to display them.
|
||||||
|
|
||||||
MPD widget
|
MPD widget
|
||||||
mpdwidget = widget({ type = 'textbox', name = 'mpdwidget' })
|
mpdwidget = widget({ type = 'textbox', name = 'mpdwidget' })
|
||||||
vicious.register(mpdwidget, vicious.widgets.mpd, '$1', 30)
|
vicious.register(mpdwidget, vicious.widgets.mpd, '$1', 15)
|
||||||
|
|
||||||
- executed every 30 seconds, takes no arguments
|
- executed every 15 seconds, takes no arguments
|
||||||
|
|
||||||
Memory widget
|
Memory widget
|
||||||
memwidget = widget({ type = 'textbox', name = 'memwidget' })
|
memwidget = widget({ type = 'textbox', name = 'memwidget' })
|
||||||
|
|
Loading…
Reference in New Issue