X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/d396af0a5a6c17c81e4c4d248b90eefc0cb55f2a..fdd63454b51a35418ec23d3489cf20ae66a2299d:/awesome/widgets/calendar.lua diff --git a/awesome/widgets/calendar.lua b/awesome/widgets/calendar.lua index cdf58ae..3206253 100644 --- a/awesome/widgets/calendar.lua +++ b/awesome/widgets/calendar.lua @@ -9,6 +9,7 @@ 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 } @@ -22,11 +23,11 @@ calendar.bg = beautiful.bg_normal or "#FFFFFF" 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), @@ -83,7 +84,7 @@ function calendar:show(inc_offset) text = text:gsub("%[7m","") - text = text:gsub("%[27m", "") + text = text:gsub("%[0m", "") cal_notification = naughty.notify({ text = text,