aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2021-03-25 09:57:38 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2021-03-25 09:57:38 +0000
commite780b1d9a55b01d116db47eb2c932c94aa11ec77 (patch)
tree9452993aa5ac2b1d5794fc9ec81c41166bfad8d9
parent4f6f895566099c21ca58ecbf3361a5a3609db360 (diff)
downloaddotfiles-e780b1d9a55b01d116db47eb2c932c94aa11ec77.tar.gz
dotfiles-e780b1d9a55b01d116db47eb2c932c94aa11ec77.tar.bz2
dotfiles-e780b1d9a55b01d116db47eb2c932c94aa11ec77.zip
(Emacs)~clean up modelines for refined output
-rw-r--r--Emacs/.config/emacs/config.org20
1 files changed, 11 insertions, 9 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index 30d16e6..45d59a9 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -870,6 +870,7 @@ Collection of snippets, activate after yasnippet has been loaded.
** Emacs Mode-line
:PROPERTIES:
:HTML_CONTAINER: details
+:header-args:emacs-lisp: :tangle no
:END:
Firstly, declare a variable for the separator between each module
#+begin_src emacs-lisp
@@ -958,21 +959,22 @@ with colouring and a ton of presentations to choose from.
(funcall (telephone-line-projectile-segment) face)
(propertize
(concat "/"
- (file-relative-name (file-truename (buffer-file-name)) (projectile-project-root)))
+ (file-relative-name (file-truename (buffer-file-name))
+ (projectile-project-root)))
'help-echo (buffer-file-name)))
(buffer-file-name)))
(t (buffer-name))))
- (telephone-line-defsegment +telephone/get-count-of-visual ()
- (if (not mark-active)
- ""
- (let ((beg (region-beginning))
- (end (region-end)))
- (format "Count: %d" (- end beg)))))
+
+ (telephone-line-defsegment +telephone/get-position ()
+ `(,(concat "%l:%c"
+ (if (not mark-active)
+ ""
+ (format " | %dc" (- (+ 1 (region-end)) (region-beginning)))))))
+
(setq-default
telephone-line-lhs '((mode telephone-line-major-mode-segment)
(file-info telephone-line-input-info-segment)
- (position telephone-line-airline-position-segment
- +telephone/get-count-of-visual)
+ (position +telephone/get-position)
(accent +telephone/buffer-or-filename
telephone-line-process-segment))
telephone-line-rhs '((accent telephone-line-flycheck-segment telephone-line-misc-info-segment