diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-04-02 01:08:12 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-04-02 01:08:12 +0200 |
commit | 448275a3865d1db82a6fc37d60548da8b865e5e0 (patch) | |
tree | ed0b9134b26d2002ec289210fb0915f41b26d59f /widgets/gmail.lua | |
parent | a9347ec0d033aa08d77fcc75c35d88514f9e84f5 (diff) | |
download | vicious-legacy-448275a3865d1db82a6fc37d60548da8b865e5e0.tar.xz |
widgets: reuse existing datasets where appropriate
Gmail, mbox, raid, weather and wifi could return the old value in case
there isn't new data, no need for N/A to be so common on our wibox.
Diffstat (limited to 'widgets/gmail.lua')
-rw-r--r-- | widgets/gmail.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/widgets/gmail.lua b/widgets/gmail.lua index b2f0d8c..c772be8 100644 --- a/widgets/gmail.lua +++ b/widgets/gmail.lua @@ -38,16 +38,15 @@ local rss = { -- Default is all unread local feed = rss.unread +local mail = { + ["{count}"] = 0, + ["{subject}"] = "N/A" +} -- }}} -- {{{ Gmail widget type local function worker(format, warg) - local mail = { - ["{count}"] = 0, - ["{subject}"] = "N/A" - } - -- Get info from the Gmail atom feed local f = io.popen("curl --connect-timeout 1 -m 3 -fsn " .. feed[1]) |