[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/telephone-line 6e1ecf51a2 147/195: Add doom/atom encoding
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/telephone-line 6e1ecf51a2 147/195: Add doom/atom encoding segments |
Date: |
Wed, 5 Jan 2022 02:59:41 -0500 (EST) |
branch: elpa/telephone-line
commit 6e1ecf51a28834016800f2f9644e53c49dcca37c
Author: Daniel Bordak <dbordak@fastmail.fm>
Commit: Daniel Bordak <dbordak@fastmail.fm>
Add doom/atom encoding segments
---
telephone-line-segments.el | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/telephone-line-segments.el b/telephone-line-segments.el
index da4c072c69..0b0123700d 100644
--- a/telephone-line-segments.el
+++ b/telephone-line-segments.el
@@ -56,6 +56,29 @@
mode-line-frame-identification
,(telephone-line-raw mode-line-buffer-identification t)))
+(telephone-line-defsegment* telephone-line-atom-eol-segment (&optional hide-lf)
+ "Displays the eol style of the buffer the same way Atom does.
+Set HIDE-LF to display nothing for unix endings, as it can be an assumed
default.
+Adapted from doom-modeline."
+ (pcase (coding-system-eol-type buffer-file-coding-system)
+ (0 (if hide-lf nil
+ "LF")
+ (1 "CRLF")
+ (2 "CR"))))
+
+(telephone-line-defsegment* telephone-line-atom-encoding-segment (&optional
hide-utf8)
+ "Displays the encoding of the buffer the same way Atom does.
+Set HIDE-UTF8 to display nothing for UTF-8, as it can be an assumed default.
+Adapted from doom-modeline."
+ (let ((sys (coding-system-plist buffer-file-coding-system)))
+ (cond ((memq (plist-get sys :category) '(coding-category-undecided
coding-category-utf-8))
+ (if hide-utf8 nil
+ "UTF-8"))
+ (t (upcase (symbol-name (plist-get sys :name)))))))
+
+(telephone-line-defsegment* telephone-line-filesize-segment ()
+ "%I")
+
(telephone-line-defsegment* telephone-line-simple-major-mode-segment ()
"%[%m%]")
- [nongnu] elpa/telephone-line aa746faab1 149/195: Add doomy filename segment, (continued)
- [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, 2022/01/05
- [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 <=
- [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
- [nongnu] elpa/telephone-line 0762bae37a 079/195: Corrected indentation, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 96030b4c98 026/195: Further clean up start of readme, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 2e7ba0bfc2 015/195: Make utf-8 separators a part of pbm separators, rather than separate entities altogether, ELPA Syncer, 2022/01/05