aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2009-09-18 00:13:20 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2009-09-18 00:13:20 +0200
commitbc3cf45da000ced112084c3098a4c07131041d3c (patch)
treec2d3c7ccbcf810db10bcc3d172fa55e26796b373 /README
parent7410bc0086c7783344b4362ce3d8cba340f517cd (diff)
downloadvicious-legacy-bc3cf45da000ced112084c3098a4c07131041d3c.tar.xz
README: mpd format function simplified
Diffstat (limited to 'README')
-rw-r--r--README15
1 files changed, 7 insertions, 8 deletions
diff --git a/README b/README
index aa39d76..0140157 100644
--- a/README
+++ b/README
@@ -206,14 +206,13 @@ Example widget
mpdwidget = widget({ type = 'textbox', name = 'mpdwidget' })
vicious.register(mpdwidget,vicious.widgets.mpd,
function (widget, args)
- if args[1] == "Stopped" then
- return ''
- else
- return ' <span color="white">MPD:</span> ' .. args[1]
+ if args[1] == "Stopped" then return ''
+ else return '<span color="white">MPD:</span> '..args[1]
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
@@ -223,9 +222,9 @@ to a wibox in order to display them.
MPD widget
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
memwidget = widget({ type = 'textbox', name = 'memwidget' })