diff options
| -rw-r--r-- | jakob.org | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -118,6 +118,25 @@ which aren't loaded by default. (require 'cl-extra) #+END_SRC +** Notification Daemon + +I have yet to find a way of dealing with pop-up notifications natively in Emacs +that I'm happy with, so for now, I'm just using [[https://dunst-project.org/][Dunst]]. + +#+BEGIN_SRC elisp +(call-process-shell-command "nohup dunst >/dev/null &" nil 0) +#+END_SRC + +Simple function for sending an alert to the daemon. + +#+BEGIN_SRC elisp +(defun dunst-alert (header string &rest objects) + "Send an alert to the Dunst daemon." + (let ((string (funcall #'format string objects)) + (command (format "notify-send -a \"%s\" \"%s\"" header string))) + (call-process-shell-command command nil 0))) +#+END_SRC + ** Configuration Bind some keys for working with this configuration file. @@ -1654,6 +1673,15 @@ Enable a hook for automatically identifying with Bitlbee. (erc-join . bitlbee-identify)) #+END_SRC +Enable a hook for showing a pop-up alert upon being highlighted. + +#+BEGIN_SRC elisp +(use-package ercn + :init + (when-all-loaded erc + (add-hook 'ercn-notify 'dunst-alert))) +#+END_SRC + Configure =erc-hl-nicks= to show names using pretty colors. #+BEGIN_SRC elisp |