branch: elpa/telephone-line
commit 212b3df07a58cfbeb1f767f6b7759c41e3ad44ff
Merge: fb62b73c9f 0e6fbc2a23
Author: Daniel Bordak <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #92 from sebasmonia/master
Added minions-mode-segment, compatible with minions
---
telephone-line-segments.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/telephone-line-segments.el b/telephone-line-segments.el
index 759a752909..991ab8fcfc 100644
--- a/telephone-line-segments.el
+++ b/telephone-line-segments.el
@@ -89,6 +89,9 @@ Adapted from doom-modeline."
(telephone-line-defsegment* telephone-line-simple-minor-mode-segment ()
(telephone-line-raw minor-mode-alist t))
+(telephone-line-defsegment* telephone-line-minions-mode-segment ()
+ (telephone-line-raw minions-mode-line-modes t))
+
(telephone-line-defsegment telephone-line-narrow-segment ()
"%n")
@@ -194,7 +197,7 @@ If it doesn't exist, create and cache it."
(split-string dir "[^[:word:]]" t)))))
(defun telephone-line--truncate-path (path truncate-until)
- "Truncate PATH. TRUNCATE-UNTIL indicates how far to truncate; -1 means leave
the last element, 0 means truncate all, etc."
+ "Truncate PATH. TRUNCATE-UNTIL indicates how far to truncate; -1 means
leave the last element, 0 means truncate all, etc."
(let* ((dirs (split-string path "/"))
(take (+ truncate-until (length dirs)))
(trunc (seq-take dirs take))