diff options
| author | Blake Romero <blake@blkrom.com> | 2025-10-10 23:50:50 +0100 |
|---|---|---|
| committer | Blake Romero <blake@blkrom.com> | 2025-10-10 23:50:50 +0100 |
| commit | 820e13edb1d4d16687289ca01b653af11810bd7e (patch) | |
| tree | d886b28ff1ff6c1c5c44f1c23e1c58e1e8219436 | |
| parent | e576825059d6fad13e0587d5fa367b349934d230 (diff) | |
Replace divider & fix right alignment
| -rw-r--r-- | modally.el | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -71,7 +71,7 @@ (defun modally--line-column () "Return a propertized line column position." (format-mode-line - "\sC%C" + "\sC%C │" `(,(let ((column (current-column))) (cond ((and (>= column (- fill-column 10)) @@ -84,7 +84,7 @@ "Return a propertized Git branch string." (when-let* ((buffer (buffer-file-name)) (branch (vc-git--symbolic-ref buffer))) - (format "\s%s |" (propertize branch 'face 'modally-git-branch)))) + (format "\s%s │" (propertize branch 'face 'modally-git-branch)))) (defun modally--flymake-diagnostics () "Return `flymake-mode' alert counts." @@ -104,7 +104,7 @@ (when (> errors 0) (cl-pushnew (propertize (format "e%s" errors) 'face 'error) alerts)) - (format "\s%s |" (string-join alerts "\s"))))) + (format "\s%s │" (string-join alerts "\s"))))) (defun modally--approx-time (time) "Return an approximation of TIME." @@ -130,7 +130,7 @@ (let ((face (if org-timer-pause-time 'modally-org-timer-pause 'modally-org-timer))) - (format "\s%s |" + (format "\s%s │" (propertize (modally--approx-time org-timer-mode-line-string) 'face face))))) @@ -157,7 +157,7 @@ "Modeline construct to display line & column position.") (defvar modally-display-file-size - '(:eval (format-mode-line "\s%I")) + '(:eval (format-mode-line "\s%I │")) "Modeline construct to display file size of buffer.") (defvar modally-display-flymake @@ -183,20 +183,19 @@ (defvar modally-format-default `("%e" modally-display-buffer-name - mode-line-format-right-align modally-display-org-timer modally-display-line-row modally-display-line-column - " |" modally-display-git-branch modally-display-file-size - " |" modally-display-flymake modally-display-major-mode - ) + " ") "Default modally format for the mode-line.") +(setq-default mode-line-right-align-edge 'right-fringe) + ;; HELPERS (defun modally--set-face () "Set mode-line face." |
