summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-09-18 09:21:59 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-09-18 09:22:49 +0200
commita043273c0d3d793a87393ef89af04ad20a4adbf3 (patch)
treeb3483788f4b5b06c0afe5b99c7e677a054a37c5d
parenta1efe9ab1204290538aa4093ed8f61dad8f25ed0 (diff)
downloaddotfiles-a043273c0d3d793a87393ef89af04ad20a4adbf3.tar.gz
dotfiles-a043273c0d3d793a87393ef89af04ad20a4adbf3.tar.bz2
dotfiles-a043273c0d3d793a87393ef89af04ad20a4adbf3.zip
awesome: Add gmail notifier
Requires vicious
-rw-r--r--.config/awesome/awesome.lua16
-rw-r--r--.config/awesome/gmail.21.u.pngbin0 -> 57358 bytes
2 files changed, 16 insertions, 0 deletions
diff --git a/.config/awesome/awesome.lua b/.config/awesome/awesome.lua
index da7a421..7441f02 100644
--- a/.config/awesome/awesome.lua
+++ b/.config/awesome/awesome.lua
@@ -11,6 +11,8 @@ require("eminent")
require("switcher")
+require("vicious")
+
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init(os.getenv("HOME") .. "/.local/share/awesome/themes/zenburn/theme.lua")
@@ -148,6 +150,19 @@ mytasklist.buttons = awful.util.table.join(
if client.focus then client.focus:raise() end
end))
+mygmail = widget({ type = "textbox" })
+gmail_t = awful.tooltip({ objects = { mygmail },})
+
+mygmailimg = widget({ type = "imagebox" })
+mygmailimg.image = image("/home/ben/.config/awesome/gmail.21.u.png")
+vicious.widgets.gmail.feed =
+vicious.register(mygmail, vicious.widgets.gmail,
+ function (widget, args)
+ gmail_t:set_text(args["{subject}"])
+ gmail_t:add_to_object(mygmailimg)
+ return args["{count}"]
+ end, 60)
+
for s = 1, screen.count() do
-- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
@@ -180,6 +195,7 @@ for s = 1, screen.count() do
mylayoutbox[s],
mytextclock,
s == screen.count() and mysystray or nil,
+ mygmail, mygmailimg,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft
}
diff --git a/.config/awesome/gmail.21.u.png b/.config/awesome/gmail.21.u.png
new file mode 100644
index 0000000..f9a6702
--- /dev/null
+++ b/.config/awesome/gmail.21.u.png
Binary files differ