]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/widgets/calendar.lua
lazyvim: absorb icons into rmz.util.ui
[dotfiles.git] / awesome / widgets / calendar.lua
index cdf58ae9a6c4faf78001578db2f8c12f7492df2f..3206253daf5dd3efba4279fcb2c8d0005b2ffa93 100644 (file)
@@ -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("\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,