#300 cal: revert highlight command; #308 mpd: escape quotes in cover path; weather: refresh widget when refreshing notification
This commit is contained in:
parent
a1ba90261b
commit
9ec9f475c8
4 changed files with 4 additions and 3 deletions
|
@ -68,7 +68,7 @@ function calendar.show(t_out, inc_offset, scr)
|
||||||
|
|
||||||
helpers.async(f, function(ws)
|
helpers.async(f, function(ws)
|
||||||
fg, bg = calendar.notification_preset.fg, calendar.notification_preset.bg
|
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.hide()
|
||||||
calendar.notification = naughty.notify({
|
calendar.notification = naughty.notify({
|
||||||
preset = calendar.notification_preset,
|
preset = calendar.notification_preset,
|
||||||
|
|
|
@ -112,7 +112,7 @@ local function worker(args)
|
||||||
|
|
||||||
if not string.match(mpd_now.file, "http.*://") then -- local file instead of http stream
|
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 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)
|
helpers.async({ shell, "-c", cover }, function(current_icon)
|
||||||
common.icon = current_icon:gsub("\n", "")
|
common.icon = current_icon:gsub("\n", "")
|
||||||
if #common.icon == 0 then common.icon = nil end
|
if #common.icon == 0 then common.icon = nil end
|
||||||
|
|
|
@ -68,6 +68,7 @@ local function worker(args)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not weather.notification_text then
|
if not weather.notification_text then
|
||||||
|
weather.update()
|
||||||
weather.forecast_update()
|
weather.forecast_update()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
||||||
Subproject commit 0868101cb7cd8d8947e6b36cd9a7e36c91cc3a99
|
Subproject commit e2ce961ae4ba86f373d26b79b7e7b4891e1a9aa9
|
Loading…
Add table
Reference in a new issue