+local icondir = awful.util.getdir("config").."/icons/"
+
+function make_icon(fname, left, right, h, bg)
+ local icon = image(icondir..fname)
+ local ib = widget { type = 'imagebox' }
+ local w = left + icon.width + right
+ local i = image.argb32(w, h, nil)
+
+ i:draw_rectangle(0, 0, w, h, true, beautiful.bg_normal)
+ i:insert(icon, left, math.floor((h - icon.height) / 2))
+
+ ib.image = i
+ return ib
+end
+