branch: elpa/telephone-line
commit 92a5cc6bb94106db4b2989dc51d69b626e3136a1
Author: Anand <[email protected]>
Commit: Anand <[email protected]>
Added segments for window number and projectile.
---
telephone-line-segments.el | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/telephone-line-segments.el b/telephone-line-segments.el
index 960842c868..734464169f 100644
--- a/telephone-line-segments.el
+++ b/telephone-line-segments.el
@@ -98,6 +98,23 @@ mouse-3: Toggle minor modes"
(when (boundp 'erc-modified-channels-object)
(string-trim erc-modified-channels-object)))
+(telephone-line-defsegment telephone-line-window-number-segment ()
+ (when (bound-and-true-p winum-mode)
+ (winum-get-number-string)))
+
+(telephone-line-defsegment telephone-line-projectile-segment ()
+ (if (and (fboundp 'projectile-project-name)
+ (projectile-project-name))
+ (propertize (format "[%s]" (concat (projectile-project-name)))
+ 'face '(:inherit)
+ 'display '(raise 0.0)
+ 'help-echo "Switch project"
+ 'mouse-face '(:box 1)
+ 'local-map (make-mode-line-mouse-map
+ 'mouse-1 (lambda ()
+ (interactive)
+ (projectile-switch-project))))))
+
(eval-after-load 'evil
'(telephone-line-defsegment* telephone-line-evil-tag-segment ()
(let ((tag (cond