Skip to content

Commit 3e067d7

Browse files
docs: Update notifications defaults and example
1 parent 1881ac9 commit 3e067d7

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/configuration.org

+14-2
Original file line numberDiff line numberDiff line change
@@ -2323,6 +2323,12 @@ require('orgmode').setup({
23232323
if not vim.tbl_isempty(result) then
23242324
require('orgmode.notifications.notification_popup'):new({ content = result })
23252325
end
2326+
2327+
-- Example: if you use Snacks, you can do something like this (THis is not implemented)
2328+
Snacks.notifier.notify(table.concat(result, '\n'), vim.log.levels.INFO, {
2329+
title = 'Orgmode',
2330+
ft = 'org'
2331+
})
23262332
end,
23272333
cron_notifier = function(tasks)
23282334
for _, task in ipairs(tasks) do
@@ -2332,12 +2338,18 @@ require('orgmode').setup({
23322338

23332339
-- Linux
23342340
if vim.fn.executable('notify-send') == 1 then
2335-
vim.loop.spawn('notify-send', { args = { string.format('%s\n%s\n%s', title, subtitle, date) }})
2341+
vim.system({
2342+
'notify-send',
2343+
'--icon=/path/to/orgmode/assets/nvim-orgmode-small.png',
2344+
'--app-name=orgmode',
2345+
title,
2346+
string.format('%s\n%s', subtitle, date),
2347+
})
23362348
end
23372349

23382350
-- MacOS
23392351
if vim.fn.executable('terminal-notifier') == 1 then
2340-
vim.loop.spawn('terminal-notifier', { args = { '-title', title, '-subtitle', subtitle, '-message', date }})
2352+
vim.system({ 'terminal-notifier', '-title', title, '-subtitle', subtitle, '-message', date })
23412353
end
23422354
end
23432355
end

0 commit comments

Comments
 (0)