From 2a958b324624ef16f5edb424b9ca75a8eec20c52 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Thu, 7 Sep 2017 14:03:06 +0200 Subject: widget/cal: port to 4.0 --- widgets/cal.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'widgets/cal.lua') diff --git a/widgets/cal.lua b/widgets/cal.lua index 24c9755..10dc982 100644 --- a/widgets/cal.lua +++ b/widgets/cal.lua @@ -88,14 +88,12 @@ function register(mywidget, custom_current_day_format) function tooltip:update() local month, year = os.date('%m'), os.date('%Y') state = {month, year} - tooltip:set_text(string.format('%s', displayMonth(month, year, 2))) + tooltip:set_markup(displayMonth(month, year, 2)) end tooltip:update() end tooltip:add_to_object(mywidget) - mywidget:add_signal("mouse::enter",tooltip.update) - mywidget:buttons(awful.util.table.join( awful.button({ }, 1, function() switchMonth(-1) @@ -125,6 +123,6 @@ end function switchMonth(delta) state[1] = state[1] + (delta or 1) - local text = string.format('%s', displayMonth(state[1], state[2], 2)) - tooltip:set_text(text) + local text = displayMonth(state[1], state[2], 2) + tooltip:set_markup(text) end -- cgit v1.2.3