[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/telephone-line 324da1bbb6 111/195: Add ryo-modal support
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/telephone-line 324da1bbb6 111/195: Add ryo-modal support |
Date: |
Wed, 5 Jan 2022 02:59:32 -0500 (EST) |
branch: elpa/telephone-line
commit 324da1bbb699969d58026a6ad4bd0eaf259c0bae
Author: Daniel Bordak <dbordak@fastmail.fm>
Commit: Daniel Bordak <dbordak@fastmail.fm>
Add ryo-modal support
---
telephone-line-segments.el | 8 ++++++++
telephone-line.el | 7 +++++++
2 files changed, 15 insertions(+)
diff --git a/telephone-line-segments.el b/telephone-line-segments.el
index 656e85312e..211a39d713 100644
--- a/telephone-line-segments.el
+++ b/telephone-line-segments.el
@@ -113,6 +113,14 @@ mouse-3: Toggle minor modes"
(seq-take tag 1)
tag))))
+(eval-after-load 'ryo-modal
+ '(telephone-line-defsegment* telephone-line-ryo-modal-segment
+ (let ((tag (if ryo-modal-mode
+ "RYO" "EMACS")))
+ (if telephone-line-evil-use-short-tag
+ (seq-take tag 1)
+ tag))))
+
(eval-after-load 'workgroups2
'(telephone-line-defsegment telephone-line-workgroups2-segment
(wg-mode-line-string)))
diff --git a/telephone-line.el b/telephone-line.el
index c6153ba549..3823183c58 100644
--- a/telephone-line.el
+++ b/telephone-line.el
@@ -93,6 +93,7 @@
(defcustom telephone-line-faces
'((evil . telephone-line-modal-face)
(modal . telephone-line-modal-face)
+ (ryo . telephone-line-ryo-modal-face)
(accent . (telephone-line-accent-active . telephone-line-accent-inactive))
(nil . (mode-line . mode-line-inactive)))
"Alist providing all the available face symbols.
@@ -182,6 +183,12 @@ Secondary separators do not incur a background color
change."
(face-attribute (telephone-line-face-map sym) :foreground)
(face-attribute (telephone-line-face-map subseparator-sym)
:background))))
+(defun telephone-line-ryo-modal-face (active)
+ "Return an appropriate face depending whether ryo-modal is activated, given
whether frame is ACTIVE."
+ (cond ((not active) 'mode-line-inactive)
+ ((not (boundp 'ryo-modal-mode)) 'mode-line)
+ ((not ryo-modal-mode) 'telephone-line-evil-insert)
+ (t 'telephone-line-evil-normal)))
(defun telephone-line-modal-face (active)
"Return an appropriate face for the current mode, given whether the frame is
ACTIVE."
- [nongnu] elpa/telephone-line a5c7225dad 088/195: Link to examples in readme, (continued)
- [nongnu] elpa/telephone-line a5c7225dad 088/195: Link to examples in readme, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 0b92b759f7 102/195: Added narrow segment, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 4adfbf02bb 092/195: Shorten readme, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line aa746faab1 149/195: Add doomy filename segment, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 743614f372 128/195: Force nil's width to 0; fixes clipping issue., ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 1cc28a7811 146/195: Forgot the else clause, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line dd1afefa00 152/195: Add telephone-line-error and warning faces., ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line dde8805867 142/195: Remove brackets from projectile segment, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line b3eaf4b825 134/195: Use center-lhs and center-rhs instead of keyword, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line f7014a0cc5 004/195: Add Readme, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 324da1bbb6 111/195: Add ryo-modal support,
ELPA Syncer <=
- [nongnu] elpa/telephone-line 64a1f079f5 090/195: Update copyrights, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line c9aca6ce03 143/195: Add flycheck segment, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 6e1ecf51a2 147/195: Add doom/atom encoding segments, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line cbaf1b8134 138/195: Switch guards to boundp checks rather than eval-after-load, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line e8e2078b43 131/195: Less bad name for unicode separators, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 212b3df07a 166/195: Merge pull request #92 from sebasmonia/master, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 6521585c94 180/195: Merge pull request #112 from fishyfriend/evil-god, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 06cbfc8d49 179/195: Add face for evil-god-state, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line deda33317b 187/195: Fix formatting, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line c5e08d268d 007/195: Move screenshots into subdir, ELPA Syncer, 2022/01/05