refactor(tazjin/emacs): remove telephone-line
I don't really like this package, it's kinda wonky, and now that part of my mode line logic is in the tab-bar, it's no longer needed. Change-Id: I4791a75e5ce2f0c49ef0d239cadf6a4f81c73636 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10171 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
dbc17e8c4b
commit
dfd93efee0
4 changed files with 5 additions and 31 deletions
|
@ -76,8 +76,6 @@
|
||||||
(use-package rainbow-mode)
|
(use-package rainbow-mode)
|
||||||
(use-package s)
|
(use-package s)
|
||||||
(use-package string-edit-at-point)
|
(use-package string-edit-at-point)
|
||||||
|
|
||||||
(use-package telephone-line) ;; configuration happens outside of use-package
|
|
||||||
(use-package term-switcher)
|
(use-package term-switcher)
|
||||||
|
|
||||||
(use-package undo-tree
|
(use-package undo-tree
|
||||||
|
@ -256,7 +254,6 @@
|
||||||
modes
|
modes
|
||||||
bindings
|
bindings
|
||||||
eshell-setup))
|
eshell-setup))
|
||||||
(telephone-line-setup)
|
|
||||||
(ace-window-display-mode)
|
(ace-window-display-mode)
|
||||||
|
|
||||||
;; If a local configuration library exists, it should be loaded.
|
;; If a local configuration library exists, it should be loaded.
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
(setq default-frame-alist `((font . ,font)))
|
(setq default-frame-alist `((font . ,font)))
|
||||||
(set-frame-font font t t))
|
(set-frame-font font t t))
|
||||||
|
|
||||||
;; Configure telephone-line
|
;; Configure the modeline
|
||||||
|
|
||||||
;; Implements a mode-line warning if there are any logged in TTY
|
;; Implements a mode-line warning if there are any logged in TTY
|
||||||
;; sessions apart from the graphical one.
|
;; sessions apart from the graphical one.
|
||||||
|
@ -41,6 +41,8 @@
|
||||||
(defvar cached-tty-sessions (cons (time-convert nil 'integer) (list-tty-sessions))
|
(defvar cached-tty-sessions (cons (time-convert nil 'integer) (list-tty-sessions))
|
||||||
"Cached TTY session value to avoid running the command too often.")
|
"Cached TTY session value to avoid running the command too often.")
|
||||||
|
|
||||||
|
;; TODO(tazjin): add this to the modeline
|
||||||
|
|
||||||
(defun get-cached-tty-sessions ()
|
(defun get-cached-tty-sessions ()
|
||||||
(let ((time ))
|
(let ((time ))
|
||||||
(when (< 30
|
(when (< 30
|
||||||
|
@ -51,26 +53,6 @@
|
||||||
|
|
||||||
(cdr cached-tty-sessions))
|
(cdr cached-tty-sessions))
|
||||||
|
|
||||||
(telephone-line-defsegment telephone-line-warn-tty-session ()
|
|
||||||
(when-let (sessions (get-cached-tty-sessions))
|
|
||||||
(format "W: [%s]!!" (s-join "," sessions))))
|
|
||||||
|
|
||||||
(defun telephone-line-setup ()
|
|
||||||
(setq telephone-line-lhs
|
|
||||||
'((highlight . (telephone-line-warn-tty-session))
|
|
||||||
(nil . (telephone-line-position-segment))
|
|
||||||
(accent . (telephone-line-buffer-segment))))
|
|
||||||
|
|
||||||
(setq telephone-line-rhs
|
|
||||||
'((accent . (telephone-line-major-mode-segment))))
|
|
||||||
|
|
||||||
(setq telephone-line-primary-left-separator 'telephone-line-tan-left
|
|
||||||
telephone-line-primary-right-separator 'telephone-line-tan-right
|
|
||||||
telephone-line-secondary-left-separator 'telephone-line-tan-hollow-left
|
|
||||||
telephone-line-secondary-right-separator 'telephone-line-tan-hollow-right)
|
|
||||||
|
|
||||||
(telephone-line-mode 1))
|
|
||||||
|
|
||||||
;; Auto refresh buffers
|
;; Auto refresh buffers
|
||||||
(global-auto-revert-mode 1)
|
(global-auto-revert-mode 1)
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
;; handle that gracefully.
|
;; handle that gracefully.
|
||||||
(define-key notmuch-message-mode-map (kbd "C-x C-s") #'ignore)
|
(define-key notmuch-message-mode-map (kbd "C-x C-s") #'ignore)
|
||||||
|
|
||||||
;; Define a telephone-line segment for displaying the count of unread,
|
;; Define a mode-line segment for displaying the count of unread,
|
||||||
;; important mails in the last window's mode-line:
|
;; important mails in the last window's mode-line:
|
||||||
(defvar *last-notmuch-count-redraw* 0)
|
(defvar *last-notmuch-count-redraw* 0)
|
||||||
(defvar *current-notmuch-count* nil)
|
(defvar *current-notmuch-count* nil)
|
||||||
|
@ -74,10 +74,6 @@
|
||||||
(not (equal *current-notmuch-count* "I: 0; D: 0")))
|
(not (equal *current-notmuch-count* "I: 0; D: 0")))
|
||||||
*current-notmuch-count*))
|
*current-notmuch-count*))
|
||||||
|
|
||||||
(telephone-line-defsegment telephone-line-notmuch-counts ()
|
;; TODO(tazjin): re-add this segment to the modeline
|
||||||
"This segment displays the count of unread notmuch messages in
|
|
||||||
the last window's mode-line (if unread messages are present)."
|
|
||||||
|
|
||||||
(update-display-notmuch-counts))
|
|
||||||
|
|
||||||
(provide 'mail-setup)
|
(provide 'mail-setup)
|
||||||
|
|
|
@ -88,7 +88,6 @@ pkgs.makeOverridable
|
||||||
rust-mode
|
rust-mode
|
||||||
sly
|
sly
|
||||||
string-edit-at-point
|
string-edit-at-point
|
||||||
telephone-line
|
|
||||||
terraform-mode
|
terraform-mode
|
||||||
undo-tree
|
undo-tree
|
||||||
uuidgen
|
uuidgen
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue