Skip to content

abidanBrito/sleek-modeline

Repository files navigation

sleek-modeline

https://github.com/abidanBrito/sleek-modeline/actions/workflows/compile.yml/badge.svg https://github.com/abidanBrito/sleek-modeline/actions/workflows/melpazoid.yml/badge.svg https://img.shields.io/badge/GNU_Emacs-29.1%2B-blueviolet.svg https://melpa.org/packages/sleek-modeline-badge.svg https://stable.melpa.org/packages/sleek-modeline-badge.svg https://img.shields.io/badge/License-MIT-orange.svg

The default Emacs mode-line is functional but visually dated and hard to configure. sleek-modeline replaces it with a minimal, elegant alternative that surfaces the most relevant information while keeping the implementation small and straightforward.

assets/sleek_modeline_screenshot.png

Table of Contents

Features

  • Minimal, left/right-aligned layout.
  • Configurable size / height via a box property.
  • Buffer name with optional icon and modified-state highlighting.
  • Major mode display with suffix indicators stripped.
  • Modal editing state marker (evil and meow support).
  • Line ending indicator (shown only for file-backed buffers).
  • Version control segment: branch name with icon and state-aware coloring.
  • Diagnostics segment: error, warning and info counts (support both flycheck and flymake integration).
  • Project name segment (supports both projectile and the built-in project.el).
  • LSP indicator segment (supports both eglot and lsp-mode backends).
  • Optional nerd-icons support throughout, with Unicode fallbacks when unavailable.
  • Adapts to theme changes automatically.

Installation

With use-package

From source

git clone https://github.com/abidanBrito/sleek-modeline.git ~/path/to/sleek-modeline

Then point use-package at it:

(use-package sleek-modeline
  :load-path "~/path/to/sleek-modeline"
  :config
  (sleek-modeline-mode 1))

From GitHub using straight.el

(use-package sleek-modeline
  :straight (sleek-modeline
             :type git
             :host github
             :repo "abidanBrito/sleek-modeline")
  :config
  (sleek-modeline-mode 1))

Without use-package

git clone https://github.com/abidanBrito/sleek-modeline.git ~/path/to/sleek-modeline

Then load it:

(add-to-list 'load-path "~/path/to/sleek-modeline")

(require 'sleek-modeline)
(sleek-modeline-mode 1)

Customization

All options live under M-x customize-group RET sleek-modeline. Here are the main ones:

General

VariableDefaultDescription
sleek-modeline-sizesmallMode-line height: small, medium or large.
sleek-modeline-heightnilCustom box height in pixels. Overrides sleek-modeline-size when set.
sleek-modeline-show-iconstShow nerd-icons throughout. Requires nerd-icons.
sleek-modeline-backgroundnilCustom mode-line background color. If nil, derives from default face.
sleek-modeline-edge-padding2Number of spaces added at the left and right edges.
sleek-modeline-highlight-modified-buffer-nametHighlight the buffer name when it has unsaved changes.
sleek-modeline-show-modal-statenilShow a modal editing state marker (evil / meow).
sleek-modeline-separator" » "Separator string between right-side segments.

Inactive mode-line

These options hide individual segments when the mode-line belongs to a non-selected window.

VariableDefaultDescription
sleek-modeline-hide-file-icon-inactivenilHide the file icon in inactive mode-lines.
sleek-modeline-hide-major-mode-inactivenilHide the major mode name in inactive mode-lines.
sleek-modeline-hide-line-ending-inactivenilHide the line ending style in inactive mode-lines.
sleek-modeline-hide-modal-inactivenilHide the modal state marker in inactive mode-lines.

Segments

Top-level switches for optional segments. Disabling one prevents its package from being loaded.

VariableDefaultDescription
sleek-modeline-enable-diagnosticstEnable the diagnostics (Flycheck) segment.
sleek-modeline-enable-projecttEnable the project name segment.
sleek-modeline-enable-lsptEnable the LSP indicator segment.

Version Control

VariableDefaultDescription
sleek-modeline-vc-show-icontShow a branch icon. Requires nerd-icons.
sleek-modeline-vc-use-github-iconnilUse the GitHub mark icon instead of the git branch icon.
sleek-modeline-vc-show-status-symboltAppend a symbol indicating VC state: ~ modified, + added, - removed, ! conflict, needs update, ? unregistered.
sleek-modeline-hide-vc-icon-inactivenilHide the VC icon in inactive mode-lines.
sleek-modeline-hide-vc-branch-inactive=| =nilHide the VC branch name in inactive mode-lines.

Diagnostics

VariableDefaultDescription
sleek-modeline-diagnostics-show-infotShow info-level diagnostics.
sleek-modeline-diagnostics-error-symbol"✕"Symbol for errors.
sleek-modeline-diagnostics-warning-symbol"▲"Symbol for warnings.
sleek-modeline-diagnostics-info-symbol"●"Symbol for info notes.
sleek-modeline-diagnostics-ok-symbolnilSymbol shown when the buffer is clean.

Project

VariableDefaultDescription
sleek-modeline-hide-project-name-inactivenilHide the project name in inactive mode-lines.

LSP

VariableDefaultDescription
sleek-modeline-lsp-symbol"LSP"Fallback text when nerd-icons is unavailable or icons are off.
sleek-modeline-lsp-show-namenilShow the LSP server name next to the icon.
sleek-modeline-hide-lsp-inactivenilHide the LSP indicator in inactive mode-lines.

Example configuration

(use-package sleek-modeline
  :straight (sleek-modeline
             :type git
             :host github
             :repo "abidanBrito/sleek-modeline")
  :custom
  (sleek-modeline-size 'medium)
  (sleek-modeline-show-modal-state t)
  (sleek-modeline-separator " | ")
  (sleek-modeline-vc-use-github-icon nil)
  (sleek-modeline-diagnostics-ok-symbol "")
  :config
  (sleek-modeline-mode 1))

Contributing

Contributions are welcome. Please open an issue or pull request on GitHub.

When reporting a bug, include:

  • Your Emacs version (M-x emacs-version).
  • Your sleek-modeline settings.
  • Steps to reproduce the issue.

License

This repository is released under the MIT license. See LICENSE for more information.

About

A minimal and elegant modeline for Emacs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors