Uzsolt newsreader (newsbeuter, liferea) information
From awesome
An external solution is here (you'll need overwrite to use in awesome 3.x). But if you want it with lua, see above.
You'll need lua-sqlite3, and add require("sqlite3") to your rc.lua, and a textbox (e.g. tb_rss). Create a hook e.g. hook_rss_*.
Newsbeuter "version":
function hook_rss_newsbeuter()
db = sqlite3.open("/home/zsolt/.newsbeuter/cache.db")
row = db:first_irow("SELECT COUNT(*) FROM rss_item WHERE unread=1;")
tb_rss.text = "Unread items: " .. row[1]
db:close()
end
Liferea "version":
function hook_rss_liferea()
db = sqlite3.open("/home/zsolt/.liferea_1.7/liferea.db")
row = db:first_irow("SELECT COUNT(*) FROM items where read = 0 and comment = 0;")
tb_rss.text = "Unread items: " .. row[1]
db:close()
end
You should change /home/zsolt to your home directory, or use os.getenv("HOME").
And register it:
awful.hooks.timer.register(60,hook_rss_newsbeuter)
I think, that refresh in every minutes (60 secs) is enough. But if you want more, you can overwrite 60 ;)