local awful = require("awful")
local beautiful = require("beautiful")
local naughty = require("naughty")
+local wibox = require("wibox")
local io = { popen = io.popen }
local os = { date = os.date }
calendar.position = "top_right"
calendar.offset = 0
-local calwidget = awful.widget.textclock(" %a %b %d, %k:%M ", 10)
+local calwidget = wibox.widget.textclock(" %a %b %d, %H:%M ", 10)
calwidget:connect_signal("mouse::enter", function () calendar:show(0) end)
calwidget:connect_signal("mouse::leave", function () calendar:hide() end)
-calwidget:buttons(awful.util.table.join(
+calwidget:buttons(gears.table.join(
awful.button({ }, 1, function () calendar:show(-1) end),
awful.button({ }, 3, function () calendar:show( 1) end),
awful.button({ }, 4, function () calendar:show(-1) end),
text = text:gsub("\e%[7m","<b><span "
.. "foreground='"..calendar.bg .. "' "
.. "background='"..calendar.fg .. "'>")
- text = text:gsub("\e%[27m", "</span></b>")
+ text = text:gsub("\e%[0m", "</span></b>")
cal_notification = naughty.notify({
text = text,