X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/d836fcd6255b34dc19713d9e7b0b737fee738b59..c23271b418b56cef5892f2681470199966dfd39c:/widgets/contrib/task.lua?ds=inline diff --git a/widgets/contrib/task.lua b/widgets/contrib/task.lua index 4325437..4a9b5b6 100644 --- a/widgets/contrib/task.lua +++ b/widgets/contrib/task.lua @@ -7,6 +7,7 @@ --]] local helpers = require("lain.helpers") +local markup = require("lain.util").markup local awful = require("awful") local naughty = require("naughty") local string = { format = string.format, gsub = string.gsub } @@ -32,7 +33,7 @@ function task.show(scr) helpers.async(task.show_cmd, function(f) task.notification = naughty.notify({ - preset = task_notification_preset, + preset = task.notification_preset, title = task.show_cmd, text = markup.font(task.notification_preset.font, awful.util.escape(f:gsub("\n*$", ""))) @@ -66,9 +67,10 @@ function task.attach(widget, args) task.notification_preset = args.notification_preset if not task.notification_preset then - task.notification_preset = naughty.config.defaults - task.notification_preset.font = "Monospace 10" - task.notification_preset.icon = helpers.icons_dir .. "/taskwarrior.png" + task.notification_preset = { + font = "Monospace 10", + icon = helpers.icons_dir .. "/taskwarrior.png" + } end if widget then