https://github.com/phdenzel/phd-ark-modeline
An elisp mode-line customization framework
https://github.com/phdenzel/phd-ark-modeline
customization elisp mode-line
Last synced: 6 months ago
JSON representation
An elisp mode-line customization framework
- Host: GitHub
- URL: https://github.com/phdenzel/phd-ark-modeline
- Owner: phdenzel
- License: gpl-3.0
- Created: 2022-03-09T23:50:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-02-13T10:58:44.000Z (over 1 year ago)
- Last Synced: 2025-09-19T01:28:51.097Z (11 months ago)
- Topics: customization, elisp, mode-line
- Language: Emacs Lisp
- Homepage:
- Size: 3.19 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+AUTHOR: phdenzel
#+TITLE: phd-ark-modeline.el
#+DATE: 2022-03-10 Thu
#+OPTIONS: author:nil title:t date:nil timestamp:nil toc:nil num:nil \n:nil
This is my customization of the Emacs ~mode-line~.
It provides a minor-mode for toggling the ~phd-ark-modeline~ which
includes more human-readable features (opposed to the default
"encodings").
In particular it features:
- indicator bar (see screenshot; rectangular, sigmoid, arrow-shape, etc.)
- buffer state icons (read-only & modified)
- version control identification and iconification
- unread mail indicator (provided you use ~mu4e~)
- major-mode iconification and descriptione
For the iconification, it uses the ~all-the-icons~ package which is
the only requirement.
* Installation
Download this git repository, e.g. to your home directory. In your
~init.el~ (or equivalent Emacs startup-file), use
#+begin_src emacs-lisp
(add-to-list 'load-path "~/phd-ark-modeline/")
(require 'phd-ark-modeline)
(phd-ark-modeline-mode 1)
(global-set-key (kbd "C-x |") 'phd-ark-modeline-mode)
#+end_src
or in case you're using ~use-package~
#+begin_src emacs-lisp
(use-package phd-ark-modeline
:ensure nil
:load-path "~/phd-ark-modeline/"
:after (all-the-icons flycheck mu4e)
:hook (after-init . phd-ark-modeline-mode)
:bind (("C-x |" . phd-ark-modeline-mode)))
#+end_src
* Configuration examples
The default ~phd-ark-modeline~ format is still quite conservative and
minimalistic. However, many features can be included in your
configuration and customization.
Just like for ~mode-line~, customizations can be applied by setting
the ~phd-ark-modeline-format~ (~mode-line-format~ in case of
~mode-line~):
#+begin_src emacs-lisp
(setq phd-ark-modeline-format
(list
'(:eval (phd-ark-modeline-bar))
;; analogously list all components here
))
#+end_src
For instance, my personal configuration looks like
#+begin_src emacs-lisp
(use-package phd-ark-modeline
:ensure nil
:load-path "~/local/phd-ark-modeline/"
:after all-the-icons
:hook (after-init . phd-ark-modeline-mode)
:bind (("C-x |" . phd-ark-modeline-mode))
:config
(require 'phd-ark-mu4e-setup) ;; this is my personal mu4e setup
(setq phd-ark-modeline-mu4e-unread-query phd-ark-mu4e-inbox-query)
(phd-ark-modeline-mail-mode t)
(phd-ark-modeline-column-mode t)
(setq phd-ark-modeline-format
(list
'(:eval (phd-ark-modeline-bar))
'(:eval (phd-ark-modeline-whitespace))
'(:eval (phd-ark-modeline-buffer-lock-icon))
'(:eval (phd-ark-modeline-buffer-name))
'(:eval (phd-ark-modeline-buffer-modified-icon))
'(:eval (phd-ark-modeline-whitespace))
'(:eval (phd-ark-modeline-buffer-position))
'(:eval (phd-ark-modeline-media-info))
'(:eval (phd-ark-modeline-whitespace))
'(:eval (phd-ark-modeline-flycheck-status))
'(:eval (phd-ark-modeline-whitespace 4))
'(:eval (phd-ark-modeline-vc-icon 1 1 1))
'(:eval (phd-ark-modeline-vc-status))
'(:eval (phd-ark-modeline-whitespace 4))
'(:eval (phd-ark-modeline-mail-icon))
'(:eval (phd-ark-modeline-mail-status))
'(:eval (phd-ark-modeline-whitespace))
'(:eval (phd-ark-modeline-space-between 4))
'(:eval (phd-ark-modeline-mode-icon))
'(:eval (phd-ark-modeline-whitespace))
'(:eval (phd-ark-modeline-major-mode))
'(:eval (phd-ark-modeline-whitespace)))))
#+end_src
#+ATTR_HTML: :width 400 :style margin-left: auto; margin-right: auto;
[[./imgs/screenshot_example.png]]