add awesome-tray.el to put the modeline info into the echo area

This commit is contained in:
2021-01-25 19:50:21 +01:00
parent 2cf9b48b3d
commit 15ee156a36
4 changed files with 846 additions and 0 deletions

View File

@@ -92,6 +92,42 @@
)
)
(use-package awesome-tray
:defer 0.2
:config
(setq awesome-tray-info-padding-right 1)
(setq awesome-tray-buffer-name-buffer-changed t)
(setq awesome-tray-mode-line-active-color "#008b8b")
(setq awesome-tray-mode-line-inactive-color "#333333")
;; see available modules in `awesome-tray-module-alist'
(defun my-awesome-tray-module-flycheck-info ()
(string-trim (flycheck-mode-line-status-text)))
(defface my-awesome-tray-module-flycheck-face
(list (list t (list :foreground (face-foreground 'font-lock-warning-face))))
"Flycheck module face."
:group 'awesome-tray)
(add-to-list 'awesome-tray-module-alist
'("flycheck" . (my-awesome-tray-module-flycheck-info my-awesome-tray-module-flycheck-face)))
(setq awesome-tray-active-modules ;; circe parent-dir battery
'("file-path"
"buffer-name"
"buffer-read-only"
"location"
"mode-name"
"flycheck"
"git"))
(set-face-foreground 'awesome-tray-module-file-path-face (face-foreground 'font-lock-keyword-face))
(set-face-foreground 'awesome-tray-module-buffer-name-face (face-foreground 'font-lock-constant-face))
(set-face-foreground 'awesome-tray-module-location-face (face-foreground 'vertical-border))
(set-face-foreground 'awesome-tray-module-mode-name-face (face-foreground 'font-lock-string-face))
(defun my-awesome-tray-module-file-path-info-advice (&rest args)
"If file path is same as buffer name omit output."
(if (string= (car args) (awesome-tray-module-buffer-name-info))
""
(car args)))
(advice-add 'awesome-tray-module-file-path-info :filter-return #'my-awesome-tray-module-file-path-info-advice)
(awesome-tray-mode 1))
(use-package doc-view
:defer t
:delight (doc-view-mode "🅓oc") ;; "DocView"