Gold Ayan's Tinker Garage

I haven't focused on installing notification daemon for my linux machine which run sway in ubuntu. I come across dead simple notification notification daemon which works out of the box

Mako

Installing in ubuntu

sudo apt install mako-notifier

Then in your sway config, add the following line

exec mako

that's it. To test whether the notification working or not. Open the terminal and type the following

notify-send "Hello world notification"

To send notification from the Emacs

(org-show-notification "Hello world notification from emacs")

To send custom notification from emacs

(require 'notifications)

(defun my-on-action-function (id key)
  (message "Message %d, key \"%s\" pressed" id key))


(defun my-on-close-function (id reason)
  (message "Message %d, closed due to \"%s\"" id reason))


(notifications-notify
 :title "Title"
 :body "This is <b>important</b>."
 :actions '("Confirm" "I agree" "Refuse" "I disagree")
 :on-action 'my-on-action-function
 :on-close 'my-on-close-function)

we can control the mako daemon using makoctl command

Few things i played with makoctl are

  • dismiss the notification from the terminal
  • display the last notification from history

EDNC - The Emacs Desktop Notification Center

We can use emacs as notification daemon using a package called ednc, to use ednc ensure there is no other notification daemon is running

Install the package (package is available in melpa)

(use-package ednc)

Enable ednc-mode

  (require 'notifications)
(notifications-notify :title "1st test" :body "hello, world" :app-name "EDNC"
                      :actions '("default" "default"))

Notification list can be seen in *ednc-log* buffer

Both are awesome package, for now i will stick with mako and see how it goes.