mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-22 19:10:24 +10:00
Adding ednc (notifications) to Doom Emacs.
This commit is contained in:
@@ -184,6 +184,24 @@ List of keybindings (SPC h b b)")
|
||||
(map! :leader
|
||||
:desc "Load new theme" "h t" #'counsel-load-theme)
|
||||
|
||||
(ednc-mode 1)
|
||||
|
||||
(defun show-notification-in-buffer (old new)
|
||||
(let ((name (format "Notification %d" (ednc-notification-id (or old new)))))
|
||||
(with-current-buffer (get-buffer-create name)
|
||||
(if new (let ((inhibit-read-only t))
|
||||
(if old (erase-buffer) (ednc-view-mode))
|
||||
(insert (ednc-format-notification new t))
|
||||
(pop-to-buffer (current-buffer)))
|
||||
(kill-buffer)))))
|
||||
|
||||
(add-hook 'ednc-notification-presentation-functions
|
||||
#'show-notification-in-buffer)
|
||||
|
||||
(evil-define-key 'normal ednc-view-mode-map "d" 'ednc-dismiss-notification)
|
||||
(evil-define-key 'normal ednc-view-mode-map (kbd "RET") 'ednc-invoke-action)
|
||||
(evil-define-key 'normal ednc-view-mode-map (kbd "TAB") 'ednc-toggle-expanded-view)
|
||||
|
||||
(use-package! elfeed-goodies)
|
||||
(elfeed-goodies/setup)
|
||||
(setq elfeed-goodies/entry-pane-size 0.5)
|
||||
|
||||
Reference in New Issue
Block a user