Skip to content

Commit

Permalink
feat: Add front and end spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Mar 6, 2024
1 parent 3f32fd2 commit cfbf3ee
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions jcs-modeline.el
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
:link '(url-link :tag "Github" "https://github.com/jcs-emacs/jcs-modeline"))

(defcustom jcs-modeline-left
`("%e "
mode-line-front-space
`((:eval (jcs-modeline--render-front-spaces))
(:eval (jcs-modeline--render-buffer-identification))
(:eval (jcs-modeline--render-modes))
(:eval (jcs-modeline--render-vc-project))
Expand All @@ -66,7 +65,7 @@
(:eval (jcs-modeline--render-vc-info))
(:eval (jcs-modeline--render-line-columns))
(:eval (jcs-modeline--render-percent-position))
mode-line-end-spaces)
(:eval (jcs-modeline--render-end-spaces)))
"List of item to render on the right."
:type 'list
:group 'jcs-modeline)
Expand Down Expand Up @@ -195,6 +194,10 @@
"Wrapper for function `format-mode-line'."
(string-trim (format-mode-line format face window buffer)))

(defun jcs-modeline--moody-tab (arg0 &rest _)
"Override `moody-ta' function when inside the terminal."
(concat " " arg0 " "))

;;
;; (@* "Core" )
;;
Expand Down Expand Up @@ -255,9 +258,17 @@
(list (format (format "%%%ds" available-width) ""))
right)))

(defun jcs-modeline--moody-tab (arg0 &rest _)
"Override `moody-ta' function when inside the terminal."
(concat " " arg0 " "))
;;
;; (@* "Padding" )
;;

(defun jcs-modeline--render-front-spaces ()
"Return the front spaces."
" ")

(defun jcs-modeline--render-end-spaces ()
"Return the end spaces."
(unless elenv-graphic-p " "))

;;
;; (@* "Plugins" )
Expand Down

0 comments on commit cfbf3ee

Please sign in to comment.