diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-07-02 00:55:48 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-07-02 00:55:48 +0100 |
commit | e2dba6be7606fa8d9a08170da9add39a133bb5c0 (patch) | |
tree | fa691b0d03cf99739e92269bb4909a9fdedcbb1b /Emacs/.config/emacs | |
parent | b50d05e5a9937e9c113a1e610ba81b10f48eef0b (diff) | |
download | dotfiles-e2dba6be7606fa8d9a08170da9add39a133bb5c0.tar.gz dotfiles-e2dba6be7606fa8d9a08170da9add39a133bb5c0.tar.bz2 dotfiles-e2dba6be7606fa8d9a08170da9add39a133bb5c0.zip |
(Emacs/config)~Fix up some stuff in mode line
Diffstat (limited to 'Emacs/.config/emacs')
-rw-r--r-- | Emacs/.config/emacs/config.org | 10 | ||||
-rw-r--r-- | Emacs/.config/emacs/elisp/better-mode-line.el | 24 |
2 files changed, 17 insertions, 17 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index b1f040e..b56efd2 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -324,14 +324,14 @@ the mode line to achieve this. ) +better-mode-line/right-segment ;; RIGHT SEGMENT '((:eval (if (project-current) ;; Name of current project (if any) - (project-name - (project-current)))) - (vc-mode vc-mode) ;; Git branch (if any) - " " + (concat (project-name + (project-current)) + vc-mode) ;; ... with git branch + "")) (:eval ;; LSP information (with-eval-after-load "eglot" (if eglot--managed-mode - (eglot--mode-line-format)))) + (concat " " (eglot--mode-line-format))))) mode-line-misc-info ;; Any other information )) :config diff --git a/Emacs/.config/emacs/elisp/better-mode-line.el b/Emacs/.config/emacs/elisp/better-mode-line.el index fd29614..3abeb3f 100644 --- a/Emacs/.config/emacs/elisp/better-mode-line.el +++ b/Emacs/.config/emacs/elisp/better-mode-line.el @@ -27,18 +27,6 @@ ;;; Code: -(defun +better-mode-line/evil-state () - "Returns either the empty string if no evil-state is defined or -the first character of the evil state capitalised" - (with-eval-after-load "evil" - (if (bound-and-true-p evil-state) - (upcase - (substring - (format "%s" - evil-state) - 0 1)) - ""))) - (defvar +better-mode-line/left-segment nil "List of elements that are placed on the left of the mode-line") @@ -51,6 +39,18 @@ the first character of the evil state capitalised" (defconst +better-mode-line/--minimum-padding 4 "Minimum size of padding string.") +(defun +better-mode-line/evil-state () + "Returns either the empty string if no evil-state is defined or +the first character of the evil state capitalised" + (with-eval-after-load "evil" + (if (bound-and-true-p evil-state) + (upcase + (substring + (format "%s" + evil-state) + 0 1)) + ""))) + (defun +better-mode-line/--get-padding-size (centre-size other-size) (let* ((win-width (window-width)) (margins (window-margins)) |