Skip to content

Instantly share code, notes, and snippets.

@mmarshall540
Last active November 30, 2025 23:15
Show Gist options
  • Select an option

  • Save mmarshall540/e420f6848e39e45c6981e0f0418f5ea2 to your computer and use it in GitHub Desktop.

Select an option

Save mmarshall540/e420f6848e39e45c6981e0f0418f5ea2 to your computer and use it in GitHub Desktop.
A clean and minimal mode-line configuration (requires Emacs 30.1)
(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)
@mmarshall540
Copy link
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