From 7801c41c41b284e56d051bc833793b0da8b23460 Mon Sep 17 00:00:00 2001 From: TEC Date: Fri, 17 Feb 2023 18:13:29 +0800 Subject: [PATCH] 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. --- modules/app/everywhere/config.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/app/everywhere/config.el b/modules/app/everywhere/config.el index 107dc963b..717024405 100644 --- a/modules/app/everywhere/config.el +++ b/modules/app/everywhere/config.el @@ -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))))