fix all-the-icons loading for terminal
This commit is contained in:
@@ -179,7 +179,7 @@ DISPLAY-START: `integer', e.g. 3820"
|
||||
:defer nil
|
||||
:after my-theme
|
||||
:hook (after-init . awesome-tray-mode)
|
||||
:init (setq mode-line-format nil)
|
||||
:init
|
||||
:config
|
||||
(setq awesome-tray-info-padding-right 1)
|
||||
(setq awesome-tray-buffer-name-buffer-changed t)
|
||||
@@ -189,10 +189,33 @@ DISPLAY-START: `integer', e.g. 3820"
|
||||
(setq awesome-tray-file-path-truncated-name-length 2)
|
||||
(setq awesome-tray-file-path-full-dirname-levels 2)
|
||||
|
||||
(defun my-awesome-tray-mode-hook-conf ()
|
||||
"Hide elements of the mode-line as long awesome-tray is active.
|
||||
see `awesome-tray-mode-hook'"
|
||||
(if awesome-tray-mode
|
||||
(progn
|
||||
(put 'mode-line-format
|
||||
'initial-value (default-toplevel-value 'mode-line-format))
|
||||
;;(setq mode-line-format "")
|
||||
(setq my-backup-mode-line-format mode-line-format)
|
||||
(setq-default mode-line-format "")
|
||||
(dolist (buf (buffer-list))
|
||||
(with-current-buffer buf
|
||||
(setq mode-line-format "")))
|
||||
(message "now on"))
|
||||
(dolist (buf (buffer-list))
|
||||
(with-current-buffer buf
|
||||
(setq mode-line-format my-backup-mode-line-format)))
|
||||
(message "now off")))
|
||||
(add-hook 'awesome-tray-mode-hook #'my-awesome-tray-mode-hook-conf)
|
||||
|
||||
;; flycheck custom string
|
||||
(defun my-awesome-tray-module-flycheck-info ()
|
||||
"see `awesome-tray-module-flycheck-info'"
|
||||
(if (and (featurep 'flycheck) flycheck-mode)
|
||||
(let ((flycheck-mode-line-prefix "fc"))
|
||||
(string-trim (flycheck-mode-line-status-text))))
|
||||
(string-trim (flycheck-mode-line-status-text)))
|
||||
""))
|
||||
|
||||
;; flycheck color string
|
||||
(defface my-awesome-tray-module-flycheck-face
|
||||
@@ -350,7 +373,7 @@ DISPLAY-START: `integer', e.g. 3820"
|
||||
|
||||
(use-package all-the-icons
|
||||
:defer t
|
||||
:if (display-graphic-p)
|
||||
:init (require 'all-the-icons-autoloads)
|
||||
:config
|
||||
(when (and (not (my-font-installed-p "all-the-icons"))
|
||||
(window-system))
|
||||
@@ -410,8 +433,6 @@ DISPLAY-START: `integer', e.g. 3820"
|
||||
(registers . "e")
|
||||
(custom . "b")))
|
||||
|
||||
(if (display-graphic-p)
|
||||
(let ()
|
||||
(require 'all-the-icons)
|
||||
(setq dashboard-navigator-buttons
|
||||
;; list of lines having list of elements
|
||||
@@ -449,44 +470,7 @@ DISPLAY-START: `integer', e.g. 3820"
|
||||
(,(all-the-icons-material "help_outline" :height 1.1 :v-adjust -0.15) "Help" "?/h" (lambda (&rest _) (describe-mode)) dashboard-navigator "" "")
|
||||
(,(all-the-icons-material "help_outline" :height 1.1 :v-adjust -0.15) "My-Help" "my-help" (lambda (&rest _) (my-help)) dashboard-navigator "" "")
|
||||
(,(all-the-icons-material "refresh" :height 1.1 :v-adjust -0.15) "Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) dashboard-navigator "" "")
|
||||
))))
|
||||
(let ()
|
||||
(setq dashboard-navigator-buttons
|
||||
;; list of lines having list of elements
|
||||
;; element: (icon title help action face prefix suffix)
|
||||
`(;; 1st line custom views
|
||||
(("" "" "space" nil default "" "")
|
||||
("" "Custom Views:" "custom views" nil default "" "")
|
||||
("" "ELisp" "my-view-elisp" (lambda (&rest _) (my-tab-view-elisp)) dashboard-navigator "" "")
|
||||
("" "Python" "my-view-python" (lambda (&rest _) (my-tab-view-python)) dashboard-navigator "" "")
|
||||
("" "Shell" "my-view-shell" (lambda (&rest _) (my-tab-view-shell)) dashboard-navigator "" "")
|
||||
("" "Gnuplot" "my-view-gnuplot" (lambda (&rest _) (my-tab-view-gnuplot)) dashboard-navigator "" "")
|
||||
("" "Org-PDF" "my-view-org-pdf" (lambda (&rest _) (my-tab-view-org-pdf)) dashboard-navigator "" "")
|
||||
)
|
||||
;; 2nd line major modes 1st part
|
||||
(("" "" "space" nil default "" "")
|
||||
("" "Major Modes:" "major modes" nil default "" "")
|
||||
("" "Deft" "deft" (lambda (&rest _) (deft)) dashboard-navigator "" "")
|
||||
("" "EShell" "eshell-mode" (lambda (&rest _) (eshell)) dashboard-navigator "" "")
|
||||
("" "Magit" "magit" (lambda (&rest _) (magit)) dashboard-navigator "" "")
|
||||
("" "Mu4e" "mu4e" (lambda (&rest _) (mu4e)) dashboard-navigator "" "")
|
||||
("" "Notmuch" "notmuch" (lambda (&rest _) (notmuch)) dashboard-navigator "" "")
|
||||
("" "Org-Brain" "org-brain-visualize" (lambda (&rest _) (call-interactively 'org-brain-visualize)) dashboard-navigator "" "")
|
||||
)
|
||||
;; 3rd line major modes 2nd part
|
||||
(("" "" "space" nil default "" "")
|
||||
("" "Org-Drill" "org-drill" (lambda (&rest _) (org-drill)) dashboard-navigator "" "")
|
||||
("" "Org-Roam" "org-raom-node-find" (lambda (&rest _) (org-roam-node-find nil "index")) dashboard-navigator "" "")
|
||||
("" "Powershell" "powershell" (lambda (&rest _) (powershell)) dashboard-navigator "" "")
|
||||
("" "Shell" "shell" (lambda (&rest _) (shell)) dashboard-navigator "" "")
|
||||
("" "Treemacs" "treemacs" (lambda (&rest _) (treemacs)) dashboard-navigator "" "")
|
||||
)
|
||||
;; 4th line infos
|
||||
(("" "" "space" nil default "" "")
|
||||
("" "Help" "?/h" (lambda (&rest _) (describe-mode)) dashboard-navigator "" "")
|
||||
("" "My-Help" "my-help" (lambda (&rest _) (my-help)) dashboard-navigator "" "")
|
||||
("" "Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) dashboard-navigator "" "")
|
||||
)))))
|
||||
)))
|
||||
|
||||
;; because we use `use-package' include `use-package-statistics' if
|
||||
;; computed
|
||||
|
||||
Reference in New Issue
Block a user