From: copycat-killer Date: Fri, 3 Feb 2017 20:00:00 +0000 (+0100) Subject: #300 cal: revert highlight command; #308 mpd: escape quotes in cover path; weather... X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/9ec9f475c886a8fba0532cb3d1b47190c01352fa?hp=-c #300 cal: revert highlight command; #308 mpd: escape quotes in cover path; weather: refresh widget when refreshing notification --- 9ec9f475c886a8fba0532cb3d1b47190c01352fa diff --git a/widgets/calendar.lua b/widgets/calendar.lua index b8aeabd..f351356 100644 --- a/widgets/calendar.lua +++ b/widgets/calendar.lua @@ -68,7 +68,7 @@ function calendar.show(t_out, inc_offset, scr) helpers.async(f, function(ws) fg, bg = calendar.notification_preset.fg, calendar.notification_preset.bg - ws = ws:gsub("%c%[%d+[m]?" .. today .. "%c%[%d+[m]?", markup.bold(markup.color(bg, fg, today))) + ws = ws:gsub("%c%[%d+[m]?%s?%d+%c%[%d+[m]?", markup.bold(markup.color(bg, fg, today))) calendar.hide() calendar.notification = naughty.notify({ preset = calendar.notification_preset, diff --git a/widgets/mpd.lua b/widgets/mpd.lua index c4c4691..58e8303 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -112,7 +112,7 @@ local function worker(args) if not string.match(mpd_now.file, "http.*://") then -- local file instead of http stream local path = string.format("%s/%s", music_dir, string.match(mpd_now.file, ".*/")) - local cover = string.format("find '%s' -maxdepth 1 -type f | egrep -i -m1 '%s'", path, cover_pattern) + local cover = string.format("find '%s' -maxdepth 1 -type f | egrep -i -m1 '%s'", path:gsub("'", "\'"):gsub('"', '\"'), cover_pattern) helpers.async({ shell, "-c", cover }, function(current_icon) common.icon = current_icon:gsub("\n", "") if #common.icon == 0 then common.icon = nil end diff --git a/widgets/weather.lua b/widgets/weather.lua index febd73b..1e398cc 100644 --- a/widgets/weather.lua +++ b/widgets/weather.lua @@ -68,6 +68,7 @@ local function worker(args) end if not weather.notification_text then + weather.update() weather.forecast_update() end diff --git a/wiki b/wiki index 0868101..e2ce961 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 0868101cb7cd8d8947e6b36cd9a7e36c91cc3a99 +Subproject commit e2ce961ae4ba86f373d26b79b7e7b4891e1a9aa9