diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-09-18 00:13:20 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-09-18 00:13:20 +0200 |
commit | bc3cf45da000ced112084c3098a4c07131041d3c (patch) | |
tree | c2d3c7ccbcf810db10bcc3d172fa55e26796b373 | |
parent | 7410bc0086c7783344b4362ce3d8cba340f517cd (diff) | |
download | vicious-legacy-bc3cf45da000ced112084c3098a4c07131041d3c.tar.xz |
README: mpd format function simplified
-rw-r--r-- | README | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -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' }) |