diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-08-20 17:37:02 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-08-20 17:44:25 +0100 |
commit | 9a7e8328067dc0983bc7ee9c6d7fbebaaff929c6 (patch) | |
tree | 0d96efb21e6f5f62315ba34554d5a509b1dd2674 | |
parent | d04e608104c1d027e8937df03a5b0fd9b78217fc (diff) | |
download | dotfiles-9a7e8328067dc0983bc7ee9c6d7fbebaaff929c6.tar.gz dotfiles-9a7e8328067dc0983bc7ee9c6d7fbebaaff929c6.tar.bz2 dotfiles-9a7e8328067dc0983bc7ee9c6d7fbebaaff929c6.zip |
(Emacs)~mode line now pads vc information
-rw-r--r-- | Emacs/.config/emacs/config.org | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index a1cd33f..4ea5d23 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -302,25 +302,33 @@ Currently I use the default mode line with some customisation; simplicity is above all. *** Emacs Mode-line #+begin_src emacs-lisp +(defun +mode-line/generate-padding () + (let ((wid (frame-width)) + (str "")) + (dotimes (n (floor (/ wid 7))) + (setq str (concat str " "))) + str)) + (setq-default mode-line-format - (list "%l:%c " ;; Line and column - "%p[" ;; Where in file + Evil state - '(:eval (upcase - (substring - (format "%s" (if (bound-and-true-p evil-state) - evil-state - "")) - 0 1))) - "] " - "%+%b(" - '(:eval (format "%s" major-mode)) - ") " - "%I " - '(vc-mode vc-mode) - " " - mode-line-misc-info - mode-line-end-spaces)) + (list + "%l:%c " ;; Line and column + "%p[" ;; Where in file + Evil state + '(:eval (upcase + (substring + (format "%s" (if (bound-and-true-p evil-state) + evil-state + "")) + 0 1))) + "] " + "%+%b(" + '(:eval (format "%s" major-mode)) + ") " + "%I " + '(:eval (+mode-line/generate-padding)) + '(vc-mode vc-mode) + mode-line-misc-info + mode-line-end-spaces)) #+end_src *** WIP Telephone-line :PROPERTIES: |