From 9ca9e2f4211763b7a4e02346389aa080e4c5c86b Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sat, 19 Sep 2009 21:41:53 +0200 Subject: Next release, tag 1.0.14 --- README | 82 +++++++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 34 deletions(-) (limited to 'README') diff --git a/README b/README index 0140157..0dc8c86 100644 --- a/README +++ b/README @@ -21,19 +21,32 @@ vicious.register() to register it with vicious: vicious.register(widget, type, format, interval, warg) -widget - widget created with widget() or awful.widget (in case of a + +widget - widget created with widget() or awful.widget() (in case of a graph or a progressbar) -type - one of the available widget types (a list is below) + +type - one of the available widget types, see below for a list + format - a string argument or a function - + string - - $1, $2, $3... will be replaced by their respective value - returned from the widget type - - some widget types return tables with custom keys, in that - case use: ${key} - + function - - function(widget, args) can be used to manipulate data - returned by the widget type, more below -interval - number of seconds between updates of the widget + + string - $1, $2, $3... will be replaced by their respective value + returned by the widget type + + - some widget types return tables with custom keys, in that + case use: ${key} + + function - function(widget, args) can be used to manipulate data + returned by the widget type, more about this below + +interval - number of seconds between updates of the widget, 2s by + default + + - you should avoid intervals like: 5, 10, 30, 60 ... because + at the 60 seconds mark all of them would be executed at the + same time, instead think only about prime numbers, using + them you will have only a few widgets executed at any given + time interval + warg - some widgets require an argument to be passed, i.e. the battery ID @@ -45,7 +58,7 @@ Unregister keep - if true the widget will be suspended, waiting to be activated -Suspend - suspend all widgets, used when running on battery power +Suspend - suspend all widgets, useful when running on battery power vicious.suspend() - if you want it to happen automatically, see the example script for @@ -64,7 +77,7 @@ Regregister - vicious.register() and vicious.unregister() both return a reg object, this contains information about the widget and the updates that should be sent to it, you can pass this reg object into regregister after unregistering it, and - it will be reregistered (or activated if it was only suspended). + it will be reregistered (or activated if it was only suspended) Caching vicious.enable_caching(type) @@ -123,8 +136,8 @@ vicious.widgets.dio vicious.widgets.hddtemp - provides hard drive temperatures using the hddtemp daemon - - takes the hddtemp listening port as an argument, or fallbacks to - default port 7634 + - takes the hddtemp listening port as an argument, or defaults to + port 7634 vicious.widgets.net - provides usage statistics for all network interfaces @@ -152,7 +165,7 @@ vicious.widgets.gmail vicious.widgets.entropy - provides available system entropy - - takes the poolsize as an argument, or fallbacks to Linux 2.6 + - takes the poolsize as an argument, or defaults to Linux 2.6 default entropy pool of 4096-bits vicious.widgets.org @@ -212,7 +225,7 @@ Example widget end) - hides the mpd widget when there is no song playing, executed every - second (the default interval) + 2 seconds (the default interval) Usage examples @@ -222,58 +235,59 @@ to a wibox in order to display them. MPD widget mpdwidget = widget({ type = 'textbox', name = 'mpdwidget' }) - vicious.register(mpdwidget, vicious.widgets.mpd, '$1', 15) + vicious.register(mpdwidget, vicious.widgets.mpd, '$1', 11) - - executed every 15 seconds, takes no arguments + - executed every 11 seconds, takes no arguments Memory widget memwidget = widget({ type = 'textbox', name = 'memwidget' }) - vicious.register(memwidget, vicious.widgets.mem, '$1 ($2MB/$3MB)', 10) + vicious.register(memwidget, vicious.widgets.mem, '$1 ($2MB/$3MB)', 13) - - executed every 10 seconds, appends "MB" to 2nd and 3rd argument + - executed every 13 seconds, appends "MB" to 2nd and 3rd argument File system widget fswidget = awful.widget.progressbar({ layout = awful.widget.layout.horizontal.rightleft }) -- after setting progressbar properties, you can register with: - vicious.register(fswidget, vicious.widgets.fs, '${/home usep}', 120, true) + vicious.register(fswidget, vicious.widgets.fs, '${/home usep}', 29, true) - - executed every 120 seconds, requests the value of the ${/home usep} - key (/home usage in percent), enables support for remote file systems + - executed every 29 seconds, requests the value of the ${/home usep} + key (/home usage in percent), enables support for remote file + systems HDD temperature widget 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', 19) - - executed every 240 seconds, requests the temperature level of the + - executed every 19 seconds, requests the temperature level of the ${/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 default port is used Battery widget batwidget = awful.widget.progressbar({ layout = awful.widget.layout.horizontal.rightleft }) -- after setting progressbar properties, you can register with: - vicious.register(batwidget, vicious.widgets.bat, '$2', 60, 'BAT0') + vicious.register(batwidget, vicious.widgets.bat, '$2', 61, 'BAT0') - - executed every 60 seconds, provides "BAT0" battery ID as an + - executed every 61 seconds, provides "BAT0" battery ID as an argument CPU usage widget cpuwidget = awful.widget.graph({ layout = awful.widget.layout.horizontal.rightleft }) -- after setting graph properties, you can register with: - vicious.register(cpuwidget, vicious.widgets.cpu, '$1', 2) + vicious.register(cpuwidget, vicious.widgets.cpu, '$1', 3) - - executed every 2 seconds, feeds the graph with total usage + - executed every 3 seconds, feeds the graph with total usage percentage of all CPUs/cores Mbox widget mboxwidget = widget({ type = 'textbox', name = 'mboxwidget' }) - vicious.register(mboxwidget, vicious.widgets.mbox, '$1', 240, '/home/user/mail/Inbox') + vicious.register(mboxwidget, vicious.widgets.mbox, '$1', 5, '/home/user/mail/Inbox') - - executed every 240 seconds, provides full path to the mbox as an + - executed every 5 seconds, provides full path to the mbox as an argument Gmail widget gmailwidget = widget({ type = 'textbox', name = 'gmailwidget' }) - vicious.register(gmailwidget, vicious.widgets.gmail, 'Mail: ${count}', 600, {'user', 'pass'}) + vicious.register(gmailwidget, vicious.widgets.gmail, 'Mail: ${count}', 601, {'user', 'pass'}) - executed every 10 minutes, provides a table with login information as an argument, prepends "Mail: " to the returned value -- cgit v1.2.3