First commit.
This commit is contained in:
26
lisp/utilities/alert.el
Normal file
26
lisp/utilities/alert.el
Normal file
@@ -0,0 +1,26 @@
|
||||
;;; alert.el --- Emacs notifications. -*- lexical-binding: t; -*-
|
||||
;;; Commentary:
|
||||
;;; Code: https://github.com/jwiegley/alert
|
||||
|
||||
(defun user/alert-style ()
|
||||
"Get the preferred alert style."
|
||||
(cond
|
||||
((eq system-type 'darwin) 'growl)
|
||||
((executable-find "notify-send") 'libnotify)
|
||||
((executable-find "dbus-send") 'notifications)
|
||||
(t 'mode-line)))
|
||||
|
||||
(use-package alert
|
||||
:defer
|
||||
:config
|
||||
;; Undiagnosed issue with validate-setq.
|
||||
(setq
|
||||
;; Send alerts to alert buffer.
|
||||
alert-default-style (user/alert-style))
|
||||
(validate-setq
|
||||
;; Disable log.
|
||||
alert-log-messages nil))
|
||||
|
||||
|
||||
(provide 'utilities/alert)
|
||||
;;; alert.el ends here
|
Reference in New Issue
Block a user