(Emacs)~clean up modelines for refined output
This commit is contained in:
@@ -870,6 +870,7 @@ Collection of snippets, activate after yasnippet has been loaded.
|
|||||||
** Emacs Mode-line
|
** Emacs Mode-line
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:HTML_CONTAINER: details
|
:HTML_CONTAINER: details
|
||||||
|
:header-args:emacs-lisp: :tangle no
|
||||||
:END:
|
:END:
|
||||||
Firstly, declare a variable for the separator between each module
|
Firstly, declare a variable for the separator between each module
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -958,21 +959,22 @@ with colouring and a ton of presentations to choose from.
|
|||||||
(funcall (telephone-line-projectile-segment) face)
|
(funcall (telephone-line-projectile-segment) face)
|
||||||
(propertize
|
(propertize
|
||||||
(concat "/"
|
(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)))
|
'help-echo (buffer-file-name)))
|
||||||
(buffer-file-name)))
|
(buffer-file-name)))
|
||||||
(t (buffer-name))))
|
(t (buffer-name))))
|
||||||
(telephone-line-defsegment +telephone/get-count-of-visual ()
|
|
||||||
(if (not mark-active)
|
(telephone-line-defsegment +telephone/get-position ()
|
||||||
""
|
`(,(concat "%l:%c"
|
||||||
(let ((beg (region-beginning))
|
(if (not mark-active)
|
||||||
(end (region-end)))
|
""
|
||||||
(format "Count: %d" (- end beg)))))
|
(format " | %dc" (- (+ 1 (region-end)) (region-beginning)))))))
|
||||||
|
|
||||||
(setq-default
|
(setq-default
|
||||||
telephone-line-lhs '((mode telephone-line-major-mode-segment)
|
telephone-line-lhs '((mode telephone-line-major-mode-segment)
|
||||||
(file-info telephone-line-input-info-segment)
|
(file-info telephone-line-input-info-segment)
|
||||||
(position telephone-line-airline-position-segment
|
(position +telephone/get-position)
|
||||||
+telephone/get-count-of-visual)
|
|
||||||
(accent +telephone/buffer-or-filename
|
(accent +telephone/buffer-or-filename
|
||||||
telephone-line-process-segment))
|
telephone-line-process-segment))
|
||||||
telephone-line-rhs '((accent telephone-line-flycheck-segment telephone-line-misc-info-segment
|
telephone-line-rhs '((accent telephone-line-flycheck-segment telephone-line-misc-info-segment
|
||||||
|
|||||||
Reference in New Issue
Block a user