diff options
author | bd <bdunahu@gmail.com> | 2023-12-29 03:35:08 -0700 |
---|---|---|
committer | bd <bdunahu@gmail.com> | 2023-12-29 03:35:08 -0700 |
commit | d32d588ecb00b11a1dfda3880b4d66cd5b38a33d (patch) | |
tree | 37e7e3abc8fff321ebd9fdd7ac7f843a7359ed6f | |
parent | c305378c0c4362693b0ff45bb487f771cd5a80c5 (diff) |
Unfinished notification system.
-rw-r--r-- | .config/emacs/bd-mode-and-themes.el | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/.config/emacs/bd-mode-and-themes.el b/.config/emacs/bd-mode-and-themes.el index cf346eb..dbab69a 100644 --- a/.config/emacs/bd-mode-and-themes.el +++ b/.config/emacs/bd-mode-and-themes.el @@ -32,11 +32,27 @@ (setq emms-mode-line-icon-before-format (format "%s" (all-the-icons-fileicon "owl")) emms-mode-line-icon-enabled-p t)) +(use-package ednc + :init + (progn (defun stack-notifications (&optional hide) + "Return active notifications as a string, one +per application." + (mapconcat (lambda (notification + (let ((app-name (ednc-notification-app-name notification))) + (unless (member app-name hide) + (push app-name hide) + (end-format-notification notification))) + (ednc-notifications) ""))))) + :config + (ednc-mode) + (nconc global-mode-string '((:eval (stack-notifications)))) + (add-hook 'ednc-notification-presentation-functions + (lambda (&rest _) (force-mode-line-update t)))) + ;;;; time and date (setq display-time-format "%m/%d/%y %H:%M (%a)" display-time-default-load-average nil) (display-time) -(display-battery-mode 1) (defvar-local bd/misc-mode-line '(:eval @@ -55,7 +71,9 @@ only in the selected buffer.") 'display `((space :align-to (- (+ right right-fringe right-margin) ,reserve))))) ;;;; pad out space for time (this method is probably horrendous) -(insert-into-list global-mode-string (mode-line-fill 21) (cl-position 'display-time-string global-mode-string)) +(insert-into-list global-mode-string (mode-line-fill 30) (cl-position 'display-time-string global-mode-string)) + + ; 21 (dolist (construct '(bd/buffer-identification-mode-line bd/vc-mode-line |