summaryrefslogtreecommitdiff
path: root/jakob.org
diff options
context:
space:
mode:
authorJakob L. Kreuze2019-03-30 16:20:57 -0400
committerJakob L. Kreuze2019-03-30 16:20:57 -0400
commit769fb6a1d2c1fb15945fb6a42be23a133890f818 (patch)
tree67a3115074ee7a56a192dfc1eea32a1292a02b38 /jakob.org
parent02e91d9015e8207190c519c5b02ebc07ad449d4a (diff)
dunst-alert for ERC notifications
Diffstat (limited to 'jakob.org')
-rw-r--r--jakob.org28
1 files changed, 28 insertions, 0 deletions
diff --git a/jakob.org b/jakob.org
index d8b60d9..0cc917a 100644
--- a/jakob.org
+++ b/jakob.org
@@ -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

© 2015 - 2026 Jakob L. Kreuze