From b71dee1e1b1c71e079b9a2d5ce1de95ba8c19a64 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Mon, 14 Nov 2022 17:58:08 -0500 Subject: [PATCH] tweak modeline --- config.org | 46 ++++++++++++++++++++++++++++++++++------------ init.el | 2 +- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/config.org b/config.org index ffcd569..d3b1cda 100644 --- a/config.org +++ b/config.org @@ -52,6 +52,10 @@ The provided default ~config.el~ solarized-distinct-doc-face t solarized-scale-markdown-headlines t solarized-scale-org-headlines t) + (advice-add #'enable-theme :after + (lambda (&rest _) + (set-face-attribute 'mode-line nil :overline nil :underline nil) + (set-face-attribute 'mode-line-inactive nil :overline nil :underline nil))) (load-theme 'solarized-selenized-black t)) ;; This determines the style of line numbers in effect. If set to `nil', line @@ -117,17 +121,40 @@ This tweak applies to: Setting ~mixed-pitch-set-height~ is required to get ~mixed-pitch-mode~ to render fonts with the correct size in doom emacs, apparently. ** Modeline configuration -Configure the modeline to: - + truncate with project (so that ~~/Projects/Asuran/replicator/src/lib.rs~ becomes ~replicator/s/lib.rs~) - + Show the mu4e alert +Setup our faces, our theme doesn't play nice with doom-modeline, so we've got to change the insert state to make it's color actually unique, I'm going to use blue: #+begin_src emacs-lisp -(setq doom-modeline-buffer-file-name-style 'truncate-with-project - doom-modeline-mu4e t) +(after! doom-modeline + (custom-set-faces + '(doom-modeline-evil-insert-state + ((t + (:inherit + (font-lock-string-face bold))))))) #+end_src -Display the current time in the modeline +Configure Icons #+begin_src emacs-lisp -(display-time-mode 1) +(after! doom-modeline + (setq doom-modeline-icon t + doom-modeline-major-mode-icon t + doom-modeline-buffer-state-icon t)) +#+end_src + +Turn on the hud, see where we are at a glance: +#+begin_src emacs-lisp +(after! doom-modeline + (setq doom-modeline-hud t)) +#+end_src + +Configure file name display +#+begin_src emacs-lisp +(after! doom-modeline + (setq doom-modeline-buffer-filename-style 'truncate-with-project)) +#+end_src + +Display the time in the modeline +#+begin_src emacs-lisp +(after! doom-modeline + (setq doom-modeline-time t)) #+end_src ** Treemacs Configure treemacs, doing the following: @@ -900,11 +927,6 @@ Setup the maildirs we want to see, we'll show our notifications (:maildir "/nathan@mccarty.io/Folders/Archival/Job Search" :key ?j) (:maildir "/nathan@mccarty.io/Folders/Archival/Informed Delivery" :key ?i)))) #+end_src -Tell it to enable the modeline display -#+begin_src emacs-lisp -(after! mu4e - (mu4e-alert-enable-mode-line-display)) -#+end_src Tell it not to update the mail itself, we have a systemd unit for that #+begin_src emacs-lisp (setq +mu4e-backend nil) diff --git a/init.el b/init.el index 22ade59..94f7b84 100644 --- a/init.el +++ b/init.el @@ -24,7 +24,6 @@ (emoji +unicode) ; 🙂 hl-todo ; highlight todo-words indent-guides ; highlighted indent columns - modeline ; snazzy, Atom-inspired modeline, plus API nav-flash ; blink cursor line after big motions (popup +defaults) ; tame sudden yet inevitable temporary windows (treemacs +lsp) ; a project drawer, like neotree but cooler @@ -33,6 +32,7 @@ window-select ; visually switch windows workspaces ; tab emulation, persistence & separate workspaces zen ; distraction-free coding or writing + modeline :editor (evil +everywhere)