Update custom-write (still a WIP)
This commit is contained in:
parent
a8d817ea06
commit
c3f57fa996
1 changed files with 27 additions and 13 deletions
|
@ -14,19 +14,33 @@
|
||||||
(defconst write-mode--last-theme doom-current-theme)
|
(defconst write-mode--last-theme doom-current-theme)
|
||||||
(defconst write-mode--last-line-spacing line-spacing)
|
(defconst write-mode--last-line-spacing line-spacing)
|
||||||
|
|
||||||
(after! spaceline
|
(defun doom-write-mode-line (&optional id)
|
||||||
(spaceline-compile
|
`(:eval
|
||||||
'write
|
(let* ((active (eq (selected-window) mode-line-selected-window))
|
||||||
'(((*macro-recording *anzu *iedit *evil-substitute *flycheck)
|
(lhs (list (propertize " "
|
||||||
:skip-alternate t
|
'display
|
||||||
:tight t)
|
(pl/percent-xpm doom-modeline-height 100 0 100 0 3
|
||||||
*buffer-path
|
(face-attribute (if active 'doom-modeline-bar 'doom-modeline-inactive-bar) :background nil t)
|
||||||
*buffer-modified)
|
nil))
|
||||||
'((*selection-info :when active)
|
(*flycheck)
|
||||||
*buffer-encoding-abbrev
|
(*macro-recording)
|
||||||
(global :when active)
|
(*selection-info)
|
||||||
*buffer-position
|
(*anzu)
|
||||||
*pad)))
|
(*evil-substitute)
|
||||||
|
(*iedit)
|
||||||
|
" "
|
||||||
|
,(if (eq id 'scratch)
|
||||||
|
'(*buffer-pwd)
|
||||||
|
'(list (*buffer-path) (*buffer-name) " "))
|
||||||
|
(*buffer-state)))
|
||||||
|
(rhs (list (*buffer-encoding-abbrev) " "
|
||||||
|
(*vc) " "
|
||||||
|
(*major-mode) " "
|
||||||
|
(*buffer-position)))
|
||||||
|
(middle (propertize
|
||||||
|
" " 'display `((space :align-to (- (+ right right-fringe right-margin)
|
||||||
|
,(1+ (string-width (format-mode-line rhs)))))))))
|
||||||
|
(list lhs middle rhs))))
|
||||||
|
|
||||||
(defvar write-mode nil)
|
(defvar write-mode nil)
|
||||||
(defun doom/write-mode ()
|
(defun doom/write-mode ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue