#300 cal: revert highlight command; #308 mpd: escape quotes in cover path; weather: refresh widget when refreshing notification

This commit is contained in:
copycat-killer 2017-02-03 21:00:00 +01:00
parent a1ba90261b
commit 9ec9f475c8
4 changed files with 4 additions and 3 deletions

View file

@ -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,

View file

@ -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

View file

@ -68,6 +68,7 @@ local function worker(args)
end
if not weather.notification_text then
weather.update()
weather.forecast_update()
end

2
wiki

@ -1 +1 @@
Subproject commit 0868101cb7cd8d8947e6b36cd9a7e36c91cc3a99
Subproject commit e2ce961ae4ba86f373d26b79b7e7b4891e1a9aa9