emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/telephone-line 92a5cc6bb9 136/195: Added segments for wind


From: ELPA Syncer
Subject: [nongnu] elpa/telephone-line 92a5cc6bb9 136/195: Added segments for window number and projectile.
Date: Wed, 5 Jan 2022 02:59:40 -0500 (EST)

branch: elpa/telephone-line
commit 92a5cc6bb94106db4b2989dc51d69b626e3136a1
Author: Anand <api@cs.berkeley.edu>
Commit: Anand <api@cs.berkeley.edu>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]