From 3379638199bf15bb1439209c1d5ace8daa560cfd Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 10 Jan 2022 23:44:45 -0600 Subject: Change mode-line and tab-bar --- lisp/+modeline.el | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'lisp/+modeline.el') diff --git a/lisp/+modeline.el b/lisp/+modeline.el index a0195f1..3f25a40 100644 --- a/lisp/+modeline.el +++ b/lisp/+modeline.el @@ -88,7 +88,7 @@ This function makes a lambda, so you can throw it straight into (defun +modeline-major-mode (&optional spacer) "Display the current `major-mode'." (concat (or spacer +modeline-default-spacer) - (propertize (+string-truncate (format-mode-line mode-name) 12) + (propertize (+string-truncate (format-mode-line mode-name) 16) 'face 'bold 'keymap mode-line-major-mode-keymap 'help-echo (concat (format-mode-line mode-name) @@ -185,27 +185,30 @@ The order of elements matters: whichever one matches first is applied." (defun +modeline-position (&optional _) ; adapted from `simple-modeline' "Display the current cursor position." - (list '((line-number-mode - ((column-number-mode - (column-number-indicator-zero-based - (9 " %l:%c") - (9 " %l:%C")) - (6 " %l:"))) - ((column-number-mode - (column-number-indicator-zero-based - (5 " :%c") - (5 " :%C")))))) - '(file-percentage-mode - ((-3 "%p") "%% ")) - (if (region-active-p) - (propertize (format "%s%-5d" - (if (and (mark) (< (point) (mark))) "-" "+") - (apply '+ (mapcar - (lambda (pos) - (- (cdr pos) - (car pos))) - (region-bounds)))) - 'font-lock-face 'font-lock-variable-name-face)))) + (let ((sep "|") (before " [") (after "]")) + (list `(:propertize (line-number-mode + ((column-number-mode + (column-number-indicator-zero-based + ,(concat before "%l" sep "%c" after) + ,(concat before "%l" sep "%C" after)) + ,(concat before "%l" sep "" after))) + ((column-number-mode + (column-number-indicator-zero-based + ,(concat before sep "%c" after) + ,(concat before sep "%C" after))))) + font-lock-face font-lock-comment-face) + (if (region-active-p) + (propertize (format "%s%-5d" + (if (and (mark) (< (point) (mark))) "-" "+") + (apply '+ (mapcar + (lambda (pos) + (- (cdr pos) + (car pos))) + (region-bounds)))) + 'font-lock-face 'font-lock-variable-name-face)) + '(:propertize (file-percentage-mode + (" " (-3 "%p") "%%")) + font-lock-face font-lock-comment-face)))) (defun +modeline-vc (&optional spacer) "Display the version control branch of the current buffer in the modeline." -- cgit 1.4.1-21-gabe81