From f80b2026e3e4b9254877b1e749c6e90799f54677 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Mon, 6 Jan 2025 17:29:19 -0600 Subject: [PATCH] feat(nvim): improve orgmode notifications --- .../nvim/lua/plugins/configs/org-mode.lua | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/org-mode.lua b/users/price/dots/.config/nvim/lua/plugins/configs/org-mode.lua index d699dec5..7685c943 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/org-mode.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/org-mode.lua @@ -30,6 +30,37 @@ return { cron_enabled = true, repeater_reminder_time = { 2880, 1440, 720, 360, 180, 60, 30, 15, 10, 5, 0 }, deadline_warning_reminder_time = { 2880, 1440, 720, 360, 180, 60, 30, 15, 10, 5, 0 }, + reminder_time = { 2880, 1440, 720, 360, 180, 60, 30, 15, 10, 5, 0 }, + notifier = function(tasks) + local msg = {} + for _, task in ipairs(tasks) do + require("orgmode.utils").concat(msg, { + string.format("# %s (%s)", task.category, task.humanized_duration), + string.format( + "%s %s [#%s] %s", + string.rep("*", task.level), + task.todo, + task.priority, + task.title + ), + string.format("%s: <%s>", task.type, task.time:to_string()), + "", + }) + end + if #msg > 1 then + table.remove(msg, #msg) + vim.notify(table.concat(msg, "\n"), vim.log.levels.INFO, { + timeout = 3000, + title = "Orgmode Reminder", + ft = "org", + icon = "", + hl = { + title = "@markup.heading.3", + border = "@markup.heading.5", + }, + }) + end + end, }, org_id_link_to_org_use_id = true, org_default_notes_file = "~/Notes/notes.org",