From: Alphonse Mariya Date: Thu, 14 Dec 2017 23:33:20 +0000 (+0100) Subject: calendar: remove trailing newlines of output X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/1b4f7d7722a5ff0e38e0010f764bd8974e3cf187?ds=inline calendar: remove trailing newlines of output --- diff --git a/widget/calendar.lua b/widget/calendar.lua index 2dda890..4f927b3 100644 --- a/widget/calendar.lua +++ b/widget/calendar.lua @@ -62,7 +62,7 @@ function calendar.show(t_out, inc_offset, scr) helpers.async(f, function(ws) local fg, bg = calendar.notification_preset.fg, calendar.notification_preset.bg calendar.notification_preset.text = ws:gsub("%c%[%d+[m]?%s?%d+%c%[%d+[m]?", - markup.bold(markup.color(bg, fg, os.date("%e")))):gsub("\n*$", "") + markup.bold(markup.color(bg, fg, os.date("%e")))):gsub("[\n%s]*$", "") local widget_focused = true