tweak(everywhere): add icon to right of modeline

This adds an icon to indicate that Emacs Everywhere is being used, to
ease at-a-glance identification. The "exit_to_app" material icon was
chosen as it seems like a good fit for a window that will return you to
the application it was invoked from. The padding on the right stops the
icon from being right up against the very edge of the window.
This commit is contained in:
TEC 2023-02-17 18:13:29 +08:00 committed by Henrik Lissner
parent 29c595ed1b
commit 7801c41c41

View file

@ -30,8 +30,14 @@
45 nil nil "")
'face 'doom-modeline-buffer-minor-mode)))
(doom-modeline-def-modeline 'emacs-everywhere
'(bar modals emacs-everywhere buffer-position word-count parrot selection-info)
'(input-method major-mode checker))
'(bar modals emacs-everywhere buffer-position
word-count parrot selection-info)
'(input-method major-mode checker
#("" 0 1 ; "Exit to app" icon + a little padding
(rear-nonsticky t
display (raise -0.25)
face (:inherit doom-modeline-emphasis :family "Material Icons" :height 1.1)
help-echo "This is an Emacs Everywhere window"))))
(add-hook! 'emacs-everywhere-mode-hook
(defun +everywhere-set-modeline ()
(doom-modeline-set-modeline 'emacs-everywhere))))