Last active
November 30, 2025 23:15
-
-
Save mmarshall540/e420f6848e39e45c6981e0f0418f5ea2 to your computer and use it in GitHub Desktop.
A clean and minimal mode-line configuration (requires Emacs 30.1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (setopt mode-line-format | |
| '("%e" | |
| mode-line-front-space | |
| ;; removed mode-line-mule-info | |
| mode-line-client | |
| mode-line-modified | |
| mode-line-remote | |
| mode-line-window-dedicated | |
| ;; removed `display' property from the above constructs | |
| "\t" ; added | |
| mode-line-frame-identification | |
| mode-line-buffer-identification | |
| " " | |
| mode-line-position | |
| mode-line-format-right-align ; added | |
| (project-mode-line project-mode-line-format) | |
| (vc-mode vc-mode) | |
| " " | |
| mode-line-modes | |
| mode-line-misc-info | |
| " " ; added | |
| mode-line-end-spaces)) | |
| (setopt mode-line-modified | |
| '((:eval (if buffer-read-only "R" "")) | |
| (:propertize | |
| (:eval (if (buffer-modified-p) "×" "")) face error))) | |
| (setopt mode-line-modes (remove "(" (remove ")" mode-line-modes))) | |
| (setopt mode-line-position-column-line-format '("%l:%c")) | |
| (setopt mode-line-position-line-format '("L%l")) | |
| (setopt mode-line-remote | |
| '(:eval (if (file-remote-p default-directory) "☎" ""))) | |
| (setopt mode-line-right-align-edge 'window) |
Author
Author
Updated to improve readability of mode-line-format value and to indicate what changes were made to it in comments.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated to using tab character to align buffer-name to ensure it doesn't move, even on Windows, where apparently the spacing was different.
Switched to using a colon to separate line number and column number in
column-number-mode. Reason being that the "LATIN LETTER PIPE" that I had there wasn't covered by the fonts on my Windows work laptop. I didn't want to bother with fixing it, even though it looked a little bit nicer. My goal for this is to keep it simple, not perfect.Also for indicating a remote connection, I switched from the satellite dish emoji character to the simple "BLACK TELEPHONE" character, which is more universal. Same reason as in the last paragraph.