dotfiles/awesome/calendar.lua

20 lines
413 B
Lua
Raw Normal View History

2016-08-22 12:58:25 +01:00
local awful = require("awful")
function get_calendar()
local f = io.popen('gcal -i- -s1 .+')
local l = nil
if f ~= nil then
f:read()
l = f:read("*all")
else
l = '?'
end
f:close()
return l
end
textclock_widget = awful.widget.textclock(" %a %d %b %H:%M ")
calendar_widget = awful.tooltip({objects={textclock_widget}})
calendar_widget:set_text(get_calendar())