Skip to content

A simple service that periodically sends notifications via D-Bus

License

Notifications You must be signed in to change notification settings

moson-mo/reminder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reminder

A simple service that periodically sends notifications via D-Bus

reminder allows you to configure period tasks sending a notification message via D-Bus (org.freedesktop.Notifications.Notify).
The title and message body can be enriched with the output of a command.

Tasks / Notifications can be configured in ~/.config/reminder/tasks.json.

Configuration

{
  "Tasks": [
    {
      "Title": "Example {result}",
      "Message": "Example message\n{result}\n\nCustomize your notifications by editing tasks.json at ~/.config/reminder/",
      "TitleCommand": "echo \"Output Title\"",
      "MessageCommand": "echo \"Output Message\"",
      "ConditionCommand": "echo \"true\"",
      "Icon": "gtk-preferences",
      "Interval": 600,
      "NotificationDuration": 5
    }
  ]
}
Option Description
Title The title of the notification message.
You can use {result} as a placeholder for the output of TitleCommand
Message The message body in the notification message.
You can use {result} as a placeholder for the output of MessageCommand
TitleCommand
(optional)
A command that is being executed when the task runs.
The output can be used in Title
MessageCommand
(optional)
A command that is being executed when the task runs.
The output can be used in Message
ConditionCommand
(optional)
A command that is being executed when the task runs.
It needs to return the string true for the notification to be shown
Icon
(optional)
The name of an icon that should be used in the notification
Interval The interval in which the task is executed and notification is shown (in seconds)
NotificationDuration Number of seconds a notification is shown

Here some examples

Build

$ git clone https://github.com/moson-mo/reminder.git
$ cd reminder
$ go build

Install

Latest version
$ go install github.com/moson-mo/reminder@latest
Specific version
$ go install github.com/moson-mo/reminder@v0.1.0

Dependencies

Go D-Bus library