@@ -2335,6 +2335,12 @@ Default configuration (detailed description below):
2335
2335
if not vim.tbl_isempty(result) then
2336
2336
require('orgmode.notifications.notification_popup'):new({ content = result })
2337
2337
end
2338
+
2339
+ -- Example: if you use Snacks, you can do something like this (THis is not implemented)
2340
+ Snacks.notifier.notify(table.concat(result, '\n'), vim.log.levels.INFO, {
2341
+ title = 'Orgmode',
2342
+ ft = 'org'
2343
+ })
2338
2344
end,
2339
2345
cron_notifier = function(tasks)
2340
2346
for _, task in ipairs(tasks) do
@@ -2344,12 +2350,18 @@ Default configuration (detailed description below):
2344
2350
2345
2351
-- Linux
2346
2352
if vim.fn.executable('notify-send') == 1 then
2347
- vim.loop.spawn('notify-send', { args = { string.format('%s\n%s\n%s', title, subtitle, date) }})
2353
+ vim.system({
2354
+ 'notify-send',
2355
+ '--icon=/path/to/orgmode/assets/nvim-orgmode-small.png',
2356
+ '--app-name=orgmode',
2357
+ title,
2358
+ string.format('%s\n%s', subtitle, date),
2359
+ })
2348
2360
end
2349
2361
2350
2362
-- MacOS
2351
2363
if vim.fn.executable('terminal-notifier') == 1 then
2352
- vim.loop.spawn( 'terminal-notifier', { args = { '-title', title, '-subtitle', subtitle, '-message', date } })
2364
+ vim.system({ 'terminal-notifier', '-title', title, '-subtitle', subtitle, '-message', date })
2353
2365
end
2354
2366
end
2355
2367
end
0 commit comments