From bc3cf45da000ced112084c3098a4c07131041d3c Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Fri, 18 Sep 2009 00:13:20 +0200 Subject: README: mpd format function simplified --- README | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'README') 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 ' MPD: ' .. args[1] + if args[1] == "Stopped" then return '' + else return 'MPD: '..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' }) -- cgit v1.2.3