Emacs Appearance¶
Fonts¶
I quite like the Ubuntu family of fonts, but use the “Nerd Font” version to get some extra icons
emacs/init.el(set-face-attribute 'default nil :family "UbuntuMonoNerdFont" :height 120)
(set-face-attribute 'fixed-pitch nil :family "UbuntuMonoNerdFont" :height 120)
(set-face-attribute 'variable-pitch nil :family "UbuntuSansNerdFont" :weight 'light :height 120)
Make it easy to get relevant nerd icons
emacs/init.el(use-package nerd-icons
:ensure t)
Theme¶
Load my theme related customisations, see Emacs Themes for details.
Doric Themes
emacs/init.el(use-package doric-themes :ensure t)
(use-package alc-theme
:load-path "lisp"
:config
(require-theme 'doric-themes t)
(setq alc-theme-load-light-theme-function
(lambda () (doric-themes-select 'doric-oak))
alc-theme-load-dark-theme-function
(lambda () (doric-themes-select 'doric-pine)))
(add-to-list 'after-make-frame-functions 'alc-theme-sync-to-system-theme))
Modus Themes
(use-package alc-theme
:load-path "lisp"
:config
(require-theme 'modus-themes t)
(setopt modus-themes-bold-constructs t
modus-themes-italic-constructs t
modus-themes-prompts '(bold italic)
modus-themes-variable-pitch-ui nil)
(setq alc-theme-load-light-theme-function
(lambda () (modus-themes-load-theme 'modus-operandi))
alc-theme-load-dark-theme-function
(lambda () (modus-themes-load-theme 'modus-vivendi)))
(add-to-list 'after-make-frame-functions 'alc-theme-sync-to-system-theme))
Line Numbers¶
Enable line numbers for programming modes
emacs/init.el(add-hook 'prog-mode-hook (lambda () (display-line-numbers-mode t)))
Reserve enough space to display a line number that is 4 digits long and when a buffer is narrowed, always display the actual line number.
emacs/init.el(setq-default display-line-numbers-widen t
display-line-numbers-width 4)
Scrolling¶
With Emacs 29 came pixel-scroll-precision-mode which makes the scrolling with a touchpad experience much nicer overall.
emacs/init.el(setq pixel-scroll-precision-use-momentum nil
pixel-scroll-precision-interpolate-page t
pixel-scroll-precision-momentum-seconds 0.5)
(pixel-scroll-precision-mode t)
Tab Bar¶
Not to be confused with the tabs you see in editors like VSCode, tab-bar tabs allow for easy switching between different collections of windows - like workspaces.
emacs/init.el(use-package alc-tab-bar
:demand t
:hook (after-init . tab-bar-mode)
:bind (:map tab-prefix-map
("p" . alc-tab-bar-project-other-tab-command))
:config
(setq tab-bar-close-button-show nil)
(setq tab-bar-tab-hints t)
(setq tab-bar-auto-width nil)
(setq tab-bar-format '(tab-bar-format-tabs-groups
tab-bar-separator
tab-bar-format-align-right
tab-bar-format-global
tab-bar-format-menu-bar))
(setq tab-bar-tab-group-format-function 'alc-tab-bar-tab-group-format-function)
(setq tab-bar-tab-name-format-functions '(alc-tab-bar-tab-name-format-hints
tab-bar-tab-name-format-close-button
tab-bar-tab-name-format-face))
;; Disable the menu-bar, since it's accessible via the tab bar.
(menu-bar-mode -1))
See Tab Bar Utilities for more details
Modeline¶
For reference, here are the components that were in the default modeline
mode-line-mule-infomode-line-clientmode-line-frame-identificationmode-line-positionmode-line-misc-infomode-line-end-spaces
emacs/init.el(use-package alc-modeline
:after alc-theme
:load-path "lisp"
:config
(setq-default mode-line-format
'("%e"
mode-line-front-space
alc-modeline-window-dedicated
alc-modeline-project-identification
" "
alc-modeline-remote-indication
alc-modeline-buffer-identification
" "
alc-modeline-buffer-position
" "
mode-line-modes
)))
See Cusomising the Emacs Modeline for more details.
Miscellaneous¶
Disable some GUI elements
emacs/early-init.el(blink-cursor-mode -1)
(tool-bar-mode -1)
(setq inhibit-x-resources t
inhibit-startup-message t)
And enable others
emacs/early-init.el(context-menu-mode t)