aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2009-09-08 22:46:59 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2009-09-08 22:46:59 +0200
commit161607e5179fe3f8151d56752cf2d46963ff1aa3 (patch)
treea3d7063932fe2a5f2c094b2d8f7beb32b8f5c874 /README
parente5c980e58a3b6ca7f369ac87ab8f1fa897bb504d (diff)
downloadvicious-legacy-161607e5179fe3f8151d56752cf2d46963ff1aa3.tar.xz
Gmail widget included
Widget returns the count of new and subject of last e-mail in a Gmail inbox. Use ${count} and ${subject} in the format string to retrieve the values. Widget takes a table with login information as an argument. I don't like how gmail widgets handle sensitive data but I gave in seeing how popular they are. Better storing and handling of login information would be in order but this isn't Python and I'm out of ideas. For now use it on your own responsability, I would suggest to set login info directly in the widget and file as read-only by user.
Diffstat (limited to 'README')
-rw-r--r--README21
1 files changed, 18 insertions, 3 deletions
diff --git a/README b/README
index a3d3805..7b94998 100644
--- a/README
+++ b/README
@@ -145,6 +145,10 @@ vicious.widgets.mdir
structure
- takes the full path to the Maildir structure as an argument
+vicious.widgets.gmail
+ - provides count of new and subject of last e-mail in a Gmail inbox
+ - takes a table with Gmail login information as an argument
+
vicious.widgets.entropy
- provides available system entropy
- takes the poolsize as an argument, or fallbacks to Linux 2.6
@@ -153,7 +157,7 @@ vicious.widgets.entropy
vicious.widgets.org
- provides agenda statistics for Emacs org-mode
- takes a table with full paths to agenda files, that will be
- included, as an argument
+ parsed, as an argument
vicious.widgets.pacman
- provides number of pending updates on Arch Linux
@@ -187,8 +191,12 @@ Format functions
----------------
You can use a function instead of a string as the format parameter, so
you are able to check the value returned by the widget type and change
-it. You can change the color of a widget, i.e. on low battery, or hide
-widgets when they return a certain value, or...
+it. You can change the color of the battery widget when it goes below
+a certain point, or hide widgets when they return a certain value,
+or...
+
+ - do not confuse this with just coloring the widget, in those cases
+ standard markup can be inserted into the format string
The format function will get the widget as its first argument, and a
table with the values otherwise inserted into the format string as its
@@ -264,6 +272,13 @@ Mbox widget
- executed every 240 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'})
+
+ - executed every 10 minutes, provides a table with login information
+ as an argument, prepends "Mail: " to the returned value
+
All other widgets are used in the same manner, read each widget you
are interested in to see what data it returns. You can also use