Skip to content

Notifications and badges

ransome edited this page Jan 6, 2024 · 8 revisions

sleek sends notifications based on due dates, specifically targeting todos with due dates set for today or tomorrow. By default, sleek will deliver these notifications to the user's operating system. However, users have the flexibility to adjust this default behavior by referring to the Notification Threshold section.

If a todo's due date is in the past or if it's completed, sleek won't send a notification. Notifications are enabled by default but can be disabled in settings. Some operating systems may require specific permissions for sleek to send notifications.

If you're using macOS, the app icon in the dock will show a red badge with a count, indicating the number of tasks due within the defined threshold range.

Badges

When a task is overdue (this includes tasks, which are due in the past), it will be marked with a red dot in the upper right corner of the due date tag. Additionally, the count indicator in the sidebar will turn red, and the corresponding section will display a red dot if it contains overdue tasks.

Notification Threshold

Notifications will be triggered for todos with a due date falling within the range from the current day until the defined notification threshold value. For instance, if the threshold is set to 5 days, a notification will be triggered for a todo due in 3 days from now. However, a todo with a due date of 7 days from now will not trigger the notification.

Prevention of duplicate notifications

sleek operates without dependence on a database, resulting in the absence of unique IDs for todos. To avoid the repetition of notifications, sleek employs a mechanism for remembering sent notifications. Each notification triggers the creation of a hash based on today's date and the todo's text, and this hash is then stored in a file. When sleek is restarted and a notification attempt is made for the same todo, the application first checks the persisted hashes. If the hash is found, the notification is suppressed.