From d418b37cc63e996caf3039b0d8edb1de71954826 Mon Sep 17 00:00:00 2001 From: John Turner Date: Wed, 16 Nov 2022 21:30:07 -0500 Subject: [PATCH] created a mode-line init module and new mode-line format --- init.el | 3 ++- init/mode-line/init-mode-line.el | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 init/mode-line/init-mode-line.el diff --git a/init.el b/init.el index 584b2ff..19a67b6 100644 --- a/init.el +++ b/init.el @@ -12,7 +12,6 @@ tab-width 4) (setq-default display-fill-column-indicator-column 120 - mode-line-format (list "%b (%m)") indent-tabs-mode nil) (when (file-exists-p (file-name-concat custom-theme-directory "custom-wombat-theme.el")) @@ -36,6 +35,7 @@ (add-to-list 'load-path (file-name-concat config-directory "ibuffer")) (add-to-list 'load-path (file-name-concat config-directory "keys")) (add-to-list 'load-path (file-name-concat config-directory "man")) + (add-to-list 'load-path (file-name-concat config-directory "mode-line")) (add-to-list 'load-path (file-name-concat config-directory "lsp-mode")) (add-to-list 'load-path (file-name-concat config-directory "native-comp")) (add-to-list 'load-path (file-name-concat config-directory "package")) @@ -59,6 +59,7 @@ (require 'init-ibuffer) (require 'init-keys) (require 'init-man) +(require 'init-mode-line) (require 'init-package) (require 'init-project) (require 'init-recentf) diff --git a/init/mode-line/init-mode-line.el b/init/mode-line/init-mode-line.el new file mode 100644 index 0000000..44d3055 --- /dev/null +++ b/init/mode-line/init-mode-line.el @@ -0,0 +1,11 @@ +(setq-default mode-line-format '("%*" + " " + (:eval (if buffer-file-name + (abbreviate-file-name buffer-file-name) + (buffer-name))) + " " + "(" mode-name ")" + " " + "[" (:eval (abbreviate-file-name default-directory)) "]")) + +(provide 'init-mode-line)