diff options
author | Case Duckworth | 2021-09-28 16:22:53 -0500 |
---|---|---|
committer | Case Duckworth | 2021-09-28 16:22:53 -0500 |
commit | 556a5a3257b59e4406a51b7a1a023974cb4f93ac (patch) | |
tree | c5d79fc07fb69487b0525e3ba6ae8ad1057114c0 | |
parent | Add org-narrow-to-task (diff) | |
download | emacs-556a5a3257b59e4406a51b7a1a023974cb4f93ac.tar.gz emacs-556a5a3257b59e4406a51b7a1a023974cb4f93ac.zip |
Configurate modeline
-rw-r--r-- | init.el | 2 | ||||
-rw-r--r-- | lisp/acdw-modeline.el | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/init.el b/init.el index 5f367bb..0bc2277 100644 --- a/init.el +++ b/init.el | |||
@@ -2092,8 +2092,8 @@ the default is \"/\"." | |||
2092 | acdw-modeline/modified | 2092 | acdw-modeline/modified |
2093 | acdw-modeline/buffer-name | 2093 | acdw-modeline/buffer-name |
2094 | acdw-modeline/vc-branch | 2094 | acdw-modeline/vc-branch |
2095 | acdw-modeline/position | ||
2096 | acdw-modeline/wc | 2095 | acdw-modeline/wc |
2096 | acdw-modeline/position | ||
2097 | ) (;; right | 2097 | ) (;; right |
2098 | acdw-modeline/track | 2098 | acdw-modeline/track |
2099 | simple-modeline-segment-misc-info | 2099 | simple-modeline-segment-misc-info |
diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 3836c81..25502ec 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el | |||
@@ -35,8 +35,7 @@ Otherwise, cdr should be a function that takes two points (see `count-words')." | |||
35 | "Display the buffer name in a face reflecting its modified status." | 35 | "Display the buffer name in a face reflecting its modified status." |
36 | (propertize (concat " " | 36 | (propertize (concat " " |
37 | (truncate-string (/ (window-total-width) 2) | 37 | (truncate-string (/ (window-total-width) 2) |
38 | (buffer-name) "~") | 38 | (buffer-name) "~")) |
39 | " ") | ||
40 | 'face | 39 | 'face |
41 | (if (buffer-modified-p) | 40 | (if (buffer-modified-p) |
42 | 'font-lock-warning-face | 41 | 'font-lock-warning-face |
@@ -135,15 +134,15 @@ is, if point < mark." | |||
135 | `((line-number-mode | 134 | `((line-number-mode |
136 | ((column-number-mode | 135 | ((column-number-mode |
137 | (column-number-indicator-zero-based | 136 | (column-number-indicator-zero-based |
138 | (8 " %l:%c") | 137 | (9 " %l/%c") |
139 | (8 " %l:%C")) | 138 | (9 " %l/%C")) |
140 | (5 " L%l"))) | 139 | (6 " L%l"))) |
141 | ((column-number-mode | 140 | ((column-number-mode |
142 | (column-number-indicator-zero-based | 141 | (column-number-indicator-zero-based |
143 | (5 " C%c") | 142 | (5 " C%c") |
144 | (5 " C%C"))))) | 143 | (5 " C%C"))))) |
145 | ,(if (region-active-p) | 144 | ,(if (region-active-p) |
146 | (propertize (format "%s%s" | 145 | (propertize (format "%s%-5d" |
147 | (if (and (mark) | 146 | (if (and (mark) |
148 | (< (point) (mark))) | 147 | (< (point) (mark))) |
149 | "-" | 148 | "-" |
@@ -172,14 +171,14 @@ is, if point < mark." | |||
172 | 171 | ||
173 | (defun acdw-modeline/track () | 172 | (defun acdw-modeline/track () |
174 | "Display `tracking-mode' information." | 173 | "Display `tracking-mode' information." |
175 | (when tracking-mode | 174 | '(tracking-mode |
176 | tracking-mode-line-buffers)) | 175 | tracking-mode-line-buffers)) |
177 | 176 | ||
178 | (defun acdw-modeline/vc-branch () | 177 | (defun acdw-modeline/vc-branch () |
179 | "Display the version control branch of the current buffer in the modeline." | 178 | "Display the version control branch of the current buffer in the modeline." |
180 | ;; from https://www.gonsie.com/blorg/modeline.html, from Doom | 179 | ;; from https://www.gonsie.com/blorg/modeline.html, from Doom |
181 | (if-let ((backend (vc-backend buffer-file-name))) | 180 | (if-let ((backend (vc-backend buffer-file-name))) |
182 | (substring vc-mode (+ (if (eq backend 'Hg) 2 3) 2)))) | 181 | (concat " " (substring vc-mode (+ (if (eq backend 'Hg) 2 3) 2))))) |
183 | 182 | ||
184 | (defun acdw-modeline/wc () | 183 | (defun acdw-modeline/wc () |
185 | "Display current `wc-buffer-stats'." | 184 | "Display current `wc-buffer-stats'." |
@@ -206,3 +205,4 @@ Uses `acdw-modeline/word-count-modes' to determine which function to use." | |||
206 | (format " %s%dW" (if r "+" "") (funcall fn min max))))) | 205 | (format " %s%dW" (if r "+" "") (funcall fn min max))))) |
207 | 206 | ||
208 | (provide 'acdw-modeline) | 207 | (provide 'acdw-modeline) |
208 | ;;; acdw-modeline.el ends here | ||