Introduce `doom-modeline-icon-inactive' face.

See #301.
To display the icons in inactive windows correctly.
This commit is contained in:
Vincent Zhang 2020-02-12 16:53:35 +08:00
parent ce8c144e5c
commit ffee20bac9
3 changed files with 148 additions and 118 deletions

View file

@ -198,7 +198,7 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
;; Please refer to https://github.com/bbatsov/projectile/issues/657.
(setq doom-modeline-buffer-file-name-style 'auto)
;; Whether display icons in mode-line. Respects `all-the-icons-color-icons'.
;; Whether display icons in the mode-line. Respects `all-the-icons-color-icons'.
;; While using the server mode in GUI, should set the value explicitly.
(setq doom-modeline-icon (display-graphic-p))
@ -219,7 +219,7 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
;; Whether to use unicode as a fallback (instead of ASCII) when not using icons.
(setq doom-modeline-unicode-fallback nil)
;; Whether display the minor modes in mode-line.
;; Whether display the minor modes in the mode-line.
(setq doom-modeline-minor-modes nil)
;; If non-nil, a word count will be added to the selection-info modeline segment.
@ -246,13 +246,13 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
;; The maximum displayed length of the branch name of version control.
(setq doom-modeline-vcs-max-length 12)
;; Whether display the perspective name. Non-nil to display in mode-line.
;; Whether display the perspective name. Non-nil to display in the mode-line.
(setq doom-modeline-persp-name t)
;; If non nil the default perspective name is displayed in the mode-line.
(setq doom-modeline-display-default-persp-name nil)
;; Whether display the `lsp' state. Non-nil to display in mode-line.
;; Whether display the `lsp' state. Non-nil to display in the mode-line.
(setq doom-modeline-lsp t)
;; Whether display the GitHub notifications. It requires `ghub' package.
@ -317,7 +317,7 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
(setq inhibit-compacting-font-caches t)
```
1. A ridiculous path is displayed on mode-line while visiting a symbolink.
1. A ridiculous path is displayed on the mode-line while visiting a symbolink.
It's the default behaviors of Vanilla Emacs. If you want to display the real
names, please put this into your init file.
@ -368,25 +368,27 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
(add-hook 'doom-modeline-mode-hook 'setup-custom-doom-modeline)
```
1. How to specify font size in modeline?
1. How to specify font family in modeline?
For example:
``` emacs-lisp
(setq doom-modeline-height 1)
(set-face-attribute 'mode-line nil :height 100)
(set-face-attribute 'mode-line-inactive nil :height 100)
(set-face-attribute 'mode-line nil :family "Noto Sans" :height 100)
(set-face-attribute 'mode-line-inactive nil :family "Noto Sans" :height 100)
```
or
```emacs-lisp
(custom-set-faces
'(mode-line ((t (:height 0.9))))
'(mode-line-inactive ((t (:height 0.9)))))
'(mode-line ((t (:family "Noto Sans" :height 0.9))))
'(mode-line-inactive ((t (:family "Noto Sans" :height 0.9)))))
```
Please refer to [#189](https://github.com/seagle0128/doom-modeline/issues/189).
Please refer to
[#189](https://github.com/seagle0128/doom-modeline/issues/189) and
[#301](https://github.com/seagle0128/doom-modeline/issues/301).
1. How to disable symbolic links expanding in mode-line?

View file

@ -205,7 +205,7 @@ Specify another one if you encounter the issue."
:group'doom-modeline)
(defcustom doom-modeline-icon (display-graphic-p)
"Whether display the icons in mode-line.
"Whether display the icons in the mode-line.
It respects `all-the-icons-color-icons'.
While using the server mode in GUI, should set the value explicitly."
@ -246,7 +246,7 @@ It respects `doom-modeline-icon' and `doom-modeline-buffer-state-icon'."
:group 'doom-modeline)
(defcustom doom-modeline-minor-modes nil
"Whether display the minor modes in mode-line."
"Whether display the minor modes in the mode-line."
:type 'boolean
:group 'doom-modeline)
@ -290,7 +290,7 @@ Respects `doom-modeline-enable-word-count'."
(defcustom doom-modeline-persp-name t
"Whether display the perspective name.
Non-nil to display in mode-line."
Non-nil to display in the mode-line."
:type 'boolean
:group 'doom-modeline)
@ -302,7 +302,7 @@ Non-nil to display in mode-line."
(defcustom doom-modeline-lsp t
"Whether display the `lsp' state.
Non-nil to display in mode-line."
Non-nil to display in the mode-line."
:type 'boolean
:group 'doom-modeline)
@ -431,42 +431,47 @@ It requires `circe' or `erc' package."
(defface doom-modeline-host
'((t (:inherit italic)))
"Face for remote hosts in the modeline."
"Face for remote hosts in the mode-line."
:group 'doom-modeline-faces)
(defface doom-modeline-debug
'((t (:inherit (font-lock-doc-face bold))))
"Face for debug-level messages in the modeline. Used by vcs, checker, etc."
"Face for debug-level messages in the mode-line. Used by vcs, checker, etc."
:group 'doom-modeline-faces)
(defface doom-modeline-info
'((t (:inherit (success bold))))
"Face for info-level messages in the modeline. Used by vcs, checker, etc."
"Face for info-level messages in the mode-line. Used by vcs, checker, etc."
:group 'doom-modeline-faces)
(defface doom-modeline-warning
'((t (:inherit (warning bold))))
"Face for warnings in the modeline. Used by vcs, checker, etc."
"Face for warnings in the mode-line. Used by vcs, checker, etc."
:group 'doom-modeline-faces)
(defface doom-modeline-urgent
'((t (:inherit (error bold))))
"Face for errors in the modeline. Used by vcs, checker, etc."
"Face for errors in the mode-line. Used by vcs, checker, etc."
:group 'doom-modeline-faces)
(defface doom-modeline-unread-number
'((t (:inherit italic)))
"Face for unread number in the modeline. Used by GitHub, mu4e, etc."
"Face for unread number in the mode-line. Used by GitHub, mu4e, etc."
:group 'doom-modeline-faces)
(defface doom-modeline-bar
'((t (:inherit highlight)))
"The face used for the left-most bar on the mode-line of an active window."
"The face used for the left-most bar in the mode-line of an active window."
:group 'doom-modeline-faces)
(defface doom-modeline-bar-inactive
`((t (:background ,(face-foreground 'mode-line-inactive))))
"The face used for the left-most bar on the mode-line of an inactive window."
"The face used for the left-most bar in the mode-line of an inactive window."
:group 'doom-modeline-faces)
(defface doom-modeline-icon-inactive
`((t (:foreground ,(face-foreground 'mode-line-inactive))))
"The face used for the icon in the mode-line of an inactive window."
:group 'doom-modeline-faces)
(defface doom-modeline-evil-emacs-state
@ -823,32 +828,43 @@ See docs of `add-variable-watcher'."
(when (fboundp 'add-variable-watcher)
(add-variable-watcher symbol watch-function)))
(defun doom-modeline-icon (icon-set icon-name unicode text face &rest args)
"Display icon of ICON-NAME with FACE and ARGS in mode-line.
(defun doom-modeline-icon (icon-set icon-name unicode text &rest args)
"Display icon of ICON-NAME with ARGS in mode-line.
ICON-SET includes `octicon', `faicon', `material', `alltheicons' and `fileicon'.
UNICODE is the unicode char fallback. TEXT is the ASCII char fallback."
(let ((face (or face 'mode-line)))
(or (when (and doom-modeline-icon
icon-name
(not (string-empty-p icon-name)))
(pcase icon-set
('octicon
(apply #'all-the-icons-octicon icon-name :face face args))
('faicon
(apply #'all-the-icons-faicon icon-name :face face args))
('material
(apply #'all-the-icons-material icon-name :face face args))
('alltheicon
(apply #'all-the-icons-alltheicon icon-name :face face args))
('fileicon
(apply #'all-the-icons-fileicon icon-name :face face args))))
(when (and doom-modeline-unicode-fallback
unicode
(not (string-empty-p unicode))
(char-displayable-p (string-to-char unicode)))
UNICODE is the unicode char fallback. TEXT is the ASCII char fallback.
ARGS is same as `all-the-icons-octicon' and others."
(let ((face (or (plist-get args :face) 'mode-line)))
(or
;; Icons
(when (and doom-modeline-icon
icon-name
(not (string-empty-p icon-name)))
;; Don't use `mode-line-inactive' face for the icons since it will
;; break them if the font family is set.
;; @see https://github.com/seagle0128/doom-modeline/issues/301
(when (eq face 'mode-line-inactive)
(plist-put :face 'doom-modeline-icon-inactive))
(pcase icon-set
('octicon
(apply #'all-the-icons-octicon icon-name args))
('faicon
(apply #'all-the-icons-faicon icon-name args))
('material
(apply #'all-the-icons-material icon-name args))
('alltheicon
(apply #'all-the-icons-alltheicon icon-name args))
('fileicon
(apply #'all-the-icons-fileicon icon-name args))))
;; Unicode fallback
(and doom-modeline-unicode-fallback
unicode
(not (string-empty-p unicode))
(char-displayable-p (string-to-char unicode))
(propertize unicode 'face face))
(when text (propertize text 'face face)))))
;; ASCII text
(and text (propertize text 'face face)))))
(defun doom-modeline--make-xpm (face width height)
"Create an XPM bitmap via FACE, WIDTH and HEIGHT. Inspired by `powerline''s `pl/make-xpm'."

View file

@ -216,8 +216,8 @@ buffer where knowing the current project directory is important."
(let* ((active (doom-modeline--active))
(face (if active 'doom-modeline-buffer-path 'mode-line-inactive)))
(concat (doom-modeline-spc)
(doom-modeline-icon 'octicon "file-directory" "🖿" "" face
:v-adjust -0.05 :height 1.25)
(doom-modeline-icon 'octicon "file-directory" "🖿" ""
:face face :v-adjust -0.05 :height 1.25)
(doom-modeline-spc)
(propertize (abbreviate-file-name default-directory)
'face face))))
@ -230,10 +230,10 @@ buffer where knowing the current project directory is important."
(when (and doom-modeline-icon doom-modeline-major-mode-icon)
(let* ((icon (all-the-icons-icon-for-buffer)))
(propertize (if (symbolp icon)
(all-the-icons-faicon "file-o"
:face 'all-the-icons-dsilver
:height 0.8
:v-adjust 0.0)
(doom-modeline-icon 'faicon "file-o"
:face 'all-the-icons-dsilver
:height 0.8
:v-adjust 0.0)
icon)
'help-echo (format "Major-mode: %s" (format-mode-line mode-name))
'display '(raise -0.135))))))
@ -254,7 +254,8 @@ buffer where knowing the current project directory is important."
"Displays an ICON of buffer state with FACE.
UNICODE and TEXT are the alternatives if it is not applicable.
Uses `all-the-icons-material' to fetch the icon."
(doom-modeline-icon 'material icon unicode text face
(doom-modeline-icon 'material icon unicode text
:face face
:height 1.1
:v-adjust -0.225))
@ -364,7 +365,7 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
props (remove :inherit props))
:inherit mode-line)))
(propertize icon 'face `(:inherit ,(get-text-property 0 'face icon)
:foreground ,(face-foreground 'mode-line-inactive))))
:inherit doom-modeline-icon-inactive)))
(doom-modeline-vspc)))))
(defsubst doom-modeline--buffer-state-icon ()
@ -375,7 +376,7 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
(if (doom-modeline--active)
icon
(propertize icon 'face `(:inherit ,(get-text-property 0 'face icon)
:foreground ,(face-foreground 'mode-line-inactive))))
:inherit doom-modeline-icon-inactive)))
(doom-modeline-vspc)))))
(defsubst doom-modeline--buffer-name ()
@ -534,9 +535,10 @@ mouse-3: Toggle minor modes"
;;
(doom-modeline-def-segment minor-modes
(when (and doom-modeline-minor-modes
(doom-modeline--active))
(let ((face 'doom-modeline-buffer-minor-mode)
(when doom-modeline-minor-modes
(let ((face (if (doom-modeline--active)
'doom-modeline-buffer-minor-mode
'mode-line-inactive))
(mouse-face 'mode-line-highlight)
(help-echo "Minor mode
mouse-1: Display minor mode menu
@ -551,7 +553,7 @@ mouse-3: Toggle minor modes"))
local-map ,mode-line-minor-mode-keymap)
,(doom-modeline-spc)
(:propertize ("" ,(doom-modeline-icon 'octicon "gear" "" ";-"
face :v-adjust -0.05))
:face face :v-adjust -0.05))
mouse-face ,mouse-face
help-echo "Minions
mouse-1: Display minor modes menu"
@ -574,7 +576,8 @@ mouse-1: Display minor modes menu"
UNICODE and TEXT are fallbacks.
Uses `all-the-icons-octicon' to fetch the icon."
(doom-modeline-icon 'octicon icon unicode text face :v-adjust (or voffset -0.1)))
(doom-modeline-icon 'octicon icon unicode text
:face face :v-adjust (or voffset -0.1)))
(defvar-local doom-modeline--vcs-icon nil)
(defun doom-modeline-update-vcs-icon (&rest _)
@ -653,7 +656,7 @@ Uses `all-the-icons-octicon' to fetch the icon."
icon
(propertize icon
'face `(:inherit ,(get-text-property 0 'face icon)
:foreground ,(face-foreground 'mode-line-inactive))))
:inherit doom-modeline-icon-inactive)))
(doom-modeline-vspc))
'mouse-face 'mode-line-highlight
'help-echo (get-text-property 1 'help-echo vc-mode)
@ -673,7 +676,8 @@ Uses `all-the-icons-octicon' to fetch the icon."
UNICODE and TEXT are fallbacks.
Uses `all-the-icons-material' to fetch the icon."
(doom-modeline-icon 'material icon unicode text face :height 1.1 :v-adjust -0.225))
(doom-modeline-icon 'material icon unicode text
:face face :height 1.1 :v-adjust -0.225))
(defun doom-modeline-checker-text (text &optional face)
"Displays TEXT with FACE."
@ -992,7 +996,7 @@ mouse-1: List all problems%s"
(if active
icon
(propertize icon 'face `(:inherit ,(get-text-property 0 'face icon)
:foreground ,(face-foreground 'mode-line-inactive)))))
:inherit doom-modeline-icon-inactive))))
(when text
(concat
(doom-modeline-vspc)
@ -1076,11 +1080,11 @@ lines are selected, or the NxM dimensions of a block selection."
(if (bound-and-true-p evil-this-macro)
(char-to-string evil-this-macro)
"Macro")
'doom-modeline-panel
:face 'doom-modeline-panel
:v-adjust -0.225)
vsep
(doom-modeline-icon 'octicon "triangle-right" "" ">"
'doom-modeline-panel
:face 'doom-modeline-panel
:v-adjust -0.05)
sep))))
@ -1189,24 +1193,26 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
(defsubst doom-modeline--multiple-cursors ()
"Show the number of multiple cursors."
(cl-destructuring-bind (count . face)
(cond ((bound-and-true-p multiple-cursors-mode)
(cons (mc/num-cursors)
(if (doom-modeline--active)
'doom-modeline-panel
'mode-line-inactive)))
((bound-and-true-p evil-mc-cursor-list)
(cons (length evil-mc-cursor-list)
(cond ((not (doom-modeline--active)) 'mode-line-inactive)
(evil-mc-frozen 'doom-modeline-bar)
('doom-modeline-panel))))
((cons nil nil)))
(cond ((bound-and-true-p multiple-cursors-mode)
(cons (mc/num-cursors)
(if (doom-modeline--active)
'doom-modeline-panel
'mode-line-inactive)))
((bound-and-true-p evil-mc-cursor-list)
(cons (length evil-mc-cursor-list)
(cond ((not (doom-modeline--active)) 'mode-line-inactive)
(evil-mc-frozen 'doom-modeline-bar)
('doom-modeline-panel))))
((cons nil nil)))
(when count
(concat (propertize " " 'face face)
(or (doom-modeline-icon 'faicon "i-cursor" nil nil face :v-adjust -0.0575)
(or (doom-modeline-icon 'faicon "i-cursor" nil nil
:face face :v-adjust -0.0575)
(propertize "I"
'face `(:inherit ,face :height 1.4 :weight normal)
'display '(raise -0.1)))
(propertize (doom-modeline-vspc) 'face `(:inherit (variable-pitch ,face)))
(propertize (doom-modeline-vspc)
'face `(:inherit (variable-pitch ,face)))
(propertize (format "%d " count)
'face face)))))
@ -1250,8 +1256,8 @@ of active `multiple-cursors'."
;; TODO Include other information
(cond ((eq major-mode 'image-mode)
(cl-destructuring-bind (width . height)
(when (fboundp 'image-size)
(image-size (image-get-display-property) :pixels))
(when (fboundp 'image-size)
(image-size (image-get-display-property) :pixels))
(propertize
(format " %dx%d " width height)
'face (if (doom-modeline--active) 'mode-line 'mode-line-inactive))))))
@ -1388,7 +1394,7 @@ Requires `eyebrowse-mode' to be enabled."
'doom-modeline-persp-buffer-not-in-persp
'doom-modeline-persp-name))
(icon (doom-modeline-icon 'material "folder" "🖿" "#"
`(:inherit ,face :slant normal)
:face `(:inherit ,face :slant normal)
:height 1.1
:v-adjust -0.225)))
(when (or doom-modeline-display-default-persp-name
@ -1529,7 +1535,7 @@ TEXT is alternative if icon is not available."
(when doom-modeline-modal-icon "fiber_manual_record")
""
text
(if (doom-modeline--active) face 'mode-line-inactive)
:face (if (doom-modeline--active) face 'mode-line-inactive)
:v-adjust -0.225)
'help-echo help-echo))
@ -1686,7 +1692,8 @@ mouse-3: Describe current input method")
(defun doom-modeline-lsp-icon (text face)
"Display LSP icon (or TEXT in terminal) with FACE."
(doom-modeline-icon 'faicon "rocket" "🚀" text face :height 1.0 :v-adjust -0.0575))
(doom-modeline-icon 'faicon "rocket" "🚀" text
:face face :height 1.0 :v-adjust -0.0575))
(defvar-local doom-modeline--lsp nil)
(defun doom-modeline-update-lsp (&rest _)
@ -1877,7 +1884,9 @@ Example:
(doom-modeline-spc)
(propertize
(concat
(doom-modeline-icon 'faicon "github" "🔔" "#" 'doom-modeline-warning :v-adjust -0.0575)
(doom-modeline-icon 'faicon "github" "🔔" "#"
:face 'doom-modeline-warning
:v-adjust -0.0575)
(doom-modeline-vspc)
(propertize
(if (> doom-modeline--github-notification-number doom-modeline-number-limit)
@ -1911,7 +1920,7 @@ mouse-3: Fetch notifications"
(defun doom-modeline-debug-icon (face &rest args)
"Display debug icon with FACE and ARGS."
(doom-modeline-icon 'faicon "bug" "🐛" "!" face :v-adjust -0.0575 args))
(doom-modeline-icon 'faicon "bug" "🐛" "!" :face face :v-adjust -0.0575 args))
(defsubst doom-modeline--debug-dap ()
"The current `dap-mode' state."
@ -2027,7 +2036,8 @@ mouse-1: Toggle Debug on Quit"
(doom-modeline-spc)
(propertize
(concat
(doom-modeline-icon 'material "email" "📧" "#" 'doom-modeline-warning
(doom-modeline-icon 'material "email" "📧" "#"
:face 'doom-modeline-warning
:height 1.1 :v-adjust -0.2)
(doom-modeline-vspc)
(propertize
@ -2116,7 +2126,8 @@ mouse-1: Toggle Debug on Quit"
(doom-modeline-spc)
(propertize
(concat
(doom-modeline-icon 'material "email" "📧" "#" 'doom-modeline-warning
(doom-modeline-icon 'material "email" "📧" "#"
:face 'doom-modeline-warning
:height 1.1 :v-adjust -0.2)
(doom-modeline-vspc)
(propertize
@ -2220,7 +2231,7 @@ to be an icon and we don't want to remove that so we just return the original."
(propertize (concat
(doom-modeline-icon 'material "message" "🗊" "#"
'doom-modeline-warning
:face 'doom-modeline-warning
:height 1.0 :v-adjust -0.225)
(doom-modeline-vspc)
;; Display the number of unread buffers
@ -2308,23 +2319,23 @@ mouse-3: Switch to next unread buffer")))
(icon (if valid-percentage?
(cond (charging?
(doom-modeline-icon 'alltheicon "battery-charging" "🔋" "+"
face :height 1.4 :v-adjust -0.1))
:face face :height 1.4 :v-adjust -0.1))
((> percentage 95)
(doom-modeline-icon 'faicon "battery-full" "🔋" "-"
face :v-adjust -0.0575))
:face face :v-adjust -0.0575))
((> percentage 70)
(doom-modeline-icon 'faicon "battery-three-quarters" "🔋" "-"
face :v-adjust -0.0575))
:face face :v-adjust -0.0575))
((> percentage 40)
(doom-modeline-icon 'faicon "battery-half" "🔋" "-"
face :v-adjust -0.0575))
:face face :v-adjust -0.0575))
((> percentage battery-load-critical)
(doom-modeline-icon 'faicon "battery-quarter" "🔋" "-"
face :v-adjust -0.0575))
:face face :v-adjust -0.0575))
(t (doom-modeline-icon 'faicon "battery-empty" "🔋" "!"
face :v-adjust -0.0575)))
:face face :v-adjust -0.0575)))
(doom-modeline-icon 'faicon "battery-empty" "" "N/A"
face :v-adjust -0.0575)))
:face face :v-adjust -0.0575)))
(text (if valid-percentage? (format "%d%%%%" percentage) ""))
(help-echo (if (and battery-echo-area-format data valid-percentage?)
(battery-format battery-echo-area-format data)
@ -2395,13 +2406,14 @@ mouse-3: Switch to next unread buffer")))
(when (and doom-modeline-icon doom-modeline-major-mode-icon)
(concat
(doom-modeline-spc)
(all-the-icons-icon-for-mode 'paradox-menu-mode
:v-adjust -0.15
:face (if active
(if doom-modeline-major-mode-color-icon
'all-the-icons-silver
'mode-line)
'mode-line-inactive))))
(doom-modeline-icon 'faicon "archive"
:face (if active
(if doom-modeline-major-mode-color-icon
'all-the-icons-silver
'mode-line)
'mode-line-inactive)
:height 1.0
:v-adjust -0.0575)))
(let ((info (format-mode-line 'mode-line-buffer-identification)))
(if active
info
@ -2432,14 +2444,14 @@ The cdr can also be a function that returns a name to use.")
(doom-modeline-spc)
(when doom-modeline-icon
(concat
(all-the-icons-fileicon "elisp"
:height 1.0
:v-adjust -0.15
:face (if active
(if doom-modeline-major-mode-color-icon
'all-the-icons-purple
'mode-line)
'mode-line-inactive))
(doom-modeline-icon 'fileicon "elisp"
:face (if active
(if doom-modeline-major-mode-color-icon
'all-the-icons-purple
'mode-line)
'mode-line-inactive)
:height 1.0
:v-adjust -0.15)
(doom-modeline-spc)))
(propertize
(let ((custom (cdr (assoc (buffer-name) doom-modeline--helm-buffer-ids)))
@ -2515,12 +2527,12 @@ The cdr can also be a function that returns a name to use.")
(doom-modeline--buffer-mode-icon)
;; Snapshot icon
(doom-modeline-icon 'material "camera_alt" "📷" "%1*"
(if active
'(:inherit doom-modeline-warning :weight normal)
'mode-line-inactive)
:face (if active
'(:inherit doom-modeline-warning :weight normal)
'mode-line-inactive)
:height 1.1 :v-adjust -0.25)
(when doom-modeline-icon (doom-modeline-vspc))
;; buffer name
(and doom-modeline-icon (doom-modeline-vspc))
;; Buffer name
(propertize "*%b*" 'face (if active
'doom-modeline-buffer-timemachine
'mode-line-inactive)))))
@ -2542,9 +2554,9 @@ The cdr can also be a function that returns a name to use.")
'doom-modeline-urgent)
'mode-line-inactive)))
(propertize (doom-modeline-icon 'material "pageview" "🗐" "@"
(if doom-modeline-icon
`(:inherit ,face :weight normal)
face)
:face (if doom-modeline-icon
`(:inherit ,face :weight normal)
face)
:height 1.2 :v-adjust -0.2)
'help-echo (format "Preview on %s
mouse-1: Preview in browser