-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hello,
Emacs : 29.3
svg-lib : 0.3
nano-modeline : 1.1.0
nano-theme : 0.3.4
I use "nano-theme" and "nano-modeline" and instead of seeing icons in modeline I see text [bootstrap:XXX], I see this for exmple when I am in "capture" in orgmode (org roam dailies capture today).
Looking at the sources I see that svg-lib is required, so I add it via a :
(use-package svg-lib) in my conf and when I restart my emacs my modeline disappears and I get this kind of error :
Error during redisplay: (eval (let* ((nano-modeline-base-face (nano-modeline--base-face 'header)) (left (mapconcat (lambda (element) (if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element)))) '((nano-modeline-buffer-status "") " " (nano-modeline-buffer-name "Dashboard")))) (right (mapconcat (lambda (element) (if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element)))) '((nano-modeline-buttons (("[Journal]" org-roam-dailies-capture-today . "Journal") ("[TAB]" tab-new . "New Tab") ("[DIRED]" ziok-dired . "Dired") ("[Toolbar]" tool-bar-mode . "Toolbar") ("[Menu]" menu-bar-mode . "Menu")) t) " " (nano-modeline-window-dedicated)))) (width (window-width)) (outside fringes-outside-margins) (left-fringe (if outside -1.0 0.0)) (left-margin (if outside 0.0 1.0)) (right-fringe (if outside -1.0 0.0)) (right-margin (if outside -1.0 0.0)) (left-max-size (- width (length right) 2)) (left (if (> (length left) left-max-size) (concat (truncate-string-to-width left left-max-size) (propertize "…" 'face `(:inherit ,nano-modeline-base-face))) left))) (concat (propertize " " 'display `(space :align-to (+ left-margin (,left-fringe . left-fringe) (,left-margin . left-margin)))) (propertize " " 'face 'fringe 'display '(space :width (nano-modeline-left-fringe-width))) left (propertize " " 'face `(:inherit ,nano-modeline-base-face) 'display `(space :align-to (- right-margin (,right-fringe . right-fringe) (,right-margin . right-margin) (nano-modeline-right-fringe-width) ,(length right)))) right (propertize " " 'face 'fringe 'display '(space :width (nano-modeline-right-fringe-width)))))) signaled (wrong-type-argument listp nano-modeline-button-active-face) [25 times]
Here my conf for nano-modeline :
(use-package svg-lib)
(set-face-attribute 'default nil
:family "Roboto Mono"
:weight 'light
:height 140)
(set-face-attribute 'bold nil
:family "Roboto Mono"
:weight 'regular)
(set-face-attribute 'italic nil
:family "Victor Mono"
:weight 'semilight
:slant 'italic)
(set-fontset-font t 'unicode
(font-spec :name "Inconsolata Light"
:size 16) nil)
(set-fontset-font t '(#xe000 . #xffdd)
(font-spec :name "RobotoMono Nerd Font"
:size 16) nil)
(use-package nano-theme
:config
(load-theme 'nano t)
)
;;(use-package nano-agenda)
(use-package nano-modeline)
(nano-modeline-text-mode t)
(add-hook 'prog-mode-hook #'nano-modeline-prog-mode)
(add-hook 'text-mode-hook #'nano-modeline-text-mode)
(add-hook 'org-mode-hook #'nano-modeline-org-mode)
(add-hook 'pdf-view-mode-hook #'nano-modeline-pdf-mode)
;;(add-hook 'mu4e-headers-mode-hook #'nano-modeline-mu4e-headers-mode)
;;(add-hook 'mu4e-view-mode-hook #'nano-modeline-mu4e-message-mode)
;;(add-hook 'elfeed-show-mode-hook #'nano-modeline-elfeed-entry-mode)
;;(add-hook 'elfeed-search-mode-hook #'nano-modeline-elfeed-search-mode)
(add-hook 'term-mode-hook #'nano-modeline-term-mode)
;;(add-hook 'xwidget-webkit-mode-hook #'nano-modeline-xwidget-mode)
(add-hook 'messages-buffer-mode-hook #'nano-modeline-message-mode)
;;(add-hook 'org-capture-mode-hook #'nano-modeline-org-capture-mode)
(add-hook 'org-agenda-mode-hook #'nano-modeline-org-agenda-mode)
;; pour tester
(defun ziok-nano-modeline-org-capture-filename ()
(buffer-file-name (org-base-buffer (current-buffer))))
(defun ziok-nano-modeline-org-capture-mode ()
"Nano line for org capture mode"
(let* ((filename (ziok-nano-modeline-org-capture-filename))
(save (format "Save entry to %s" filename))
(buttons `(("SAVE" . (org-capture-finalize . ,save))
("CANCEL" . (org-capture-kill . "Delete entry"))
("[bootstrap:arrows-expand]" . (delete-other-windows . "expand"))
)))
(funcall nano-modeline-position
`((nano-modeline-buffer-status "ORG") " "
(nano-modeline-buffer-name "Capture") " "
(nano-modeline-org-capture-description))
`((nano-modeline-buttons ,buttons t) " "
(nano-modeline-window-dedicated)))))
(add-hook 'org-capture-mode-hook #'ziok-nano-modeline-org-capture-mode)
;; pour le bouton DIRED
(defun ziok-dired ()
(interactive)
"Dired button function"
(dired "/home/francois/orgmode/orgroam")
)
;; ajout de bouton sur le dashboard
(defun ziok-nano-modeline-dashboard-mode ()
"Nano line for Dashboard"
(let ((buttons '(
("[Journal]" . (org-roam-dailies-capture-today . "Journal"))
("[TAB]" . (tab-new . "New Tab"))
("[DIRED]" . (ziok-dired . "Dired"))
("[Toolbar]" . (tool-bar-mode . "Toolbar"))
("[Menu]" . (menu-bar-mode . "Menu"))
)))
(funcall nano-modeline-position
'((nano-modeline-buffer-status "") " "
(nano-modeline-buffer-name "Dashboard"))
`((nano-modeline-buttons ,buttons t) " "
(nano-modeline-window-dedicated)))))
(add-hook 'dashboard-mode-hook #'ziok-nano-modeline-dashboard-mode)
(add-hook 'post-command-hook #'force-mode-line-update)
On the other hand, "modelines" that don't use button like the default org one work very well.
And without svg-lib everything is OK but button are juste text [bootstrap:XXX]
PS : C'est un plaisir d'utiliser vos créations 👍
Metadata
Metadata
Assignees
Labels
No labels