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

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

[nongnu] elpa/telephone-line d594052b42 091/195: Add easy evil setup


From: ELPA Syncer
Subject: [nongnu] elpa/telephone-line d594052b42 091/195: Add easy evil setup
Date: Wed, 5 Jan 2022 02:59:29 -0500 (EST)

branch: elpa/telephone-line
commit d594052b42e70247f27bd4381777b56be5686a6c
Author: Daniel Bordak <dbordak@fastmail.fm>
Commit: Daniel Bordak <dbordak@fastmail.fm>

    Add easy evil setup
---
 readme.org               | 12 ++++++++++--
 telephone-line-config.el | 44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 2 deletions(-)

diff --git a/readme.org b/readme.org
index 6672b7aa0b..74a9b2bca6 100644
--- a/readme.org
+++ b/readme.org
@@ -35,8 +35,16 @@ usual stuff:
 (telephone-line-mode 1)
 #+end_src
 
-The default theme should suffice for non-evil setups, but if you want
-to further configure it, read on!
+If you want to use it with evil, instead you should do this
+
+#+begin_src emacs-lisp
+(require 'telephone-line-config)
+(telephone-line-evil-config)
+#+end_src
+
+This implicitly calls ~(telephone-line-mode 1)~.
+
+If you want to further configure it, read on!
 
 * Configuration
 
diff --git a/telephone-line-config.el b/telephone-line-config.el
new file mode 100644
index 0000000000..6c7e146dfd
--- /dev/null
+++ b/telephone-line-config.el
@@ -0,0 +1,44 @@
+;;; telephone-line-config.el --- Easy config for telephone-line
+
+;; Copyright (C) 2015-2017 Daniel Bordak
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; Easy, premade config(s) for telephone-line.
+
+;;; Code:
+
+(require 'telephone-line)
+
+(defun telephone-line-evil-config ()
+  "A simple default for using telephone-line with evil."
+  (setq telephone-line-lhs
+        '((evil   . (telephone-line-evil-tag-segment))
+          (accent . (telephone-line-vc-segment
+                     telephone-line-erc-modified-channels-segment
+                     telephone-line-process-segment))
+          (nil    . (telephone-line-minor-mode-segment
+                     telephone-line-buffer-segment))))
+
+  (setq telephone-line-rhs
+        '((nil    . (telephone-line-misc-info-segment))
+          (accent . (telephone-line-major-mode-segment))
+          (evil   . (telephone-line-airline-position-segment))))
+
+  (telephone-line-mode t))
+
+(provide 'telephone-line-config)
+;;; telephone-line-config.el ends here



reply via email to

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