dotfiles/emacs-lisp/display_settings.org
Magic_RB 26cce225ac
Switch up fonts a bit
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2022-10-30 19:29:16 +01:00

2.6 KiB

Display Settings

Adjust the font, based on the specific host.

  (defvar magic_rb/fixed-width-font "Iosevka Term Extended"
    "The font used for fixed width text.")
  (defvar magic_rb/variable-pitch-font "Iosevka Aile"
    "The font used for variable pitch text.")

  (defun magic_rb/apply-fonts ()
    (interactive)
    (pcase (system-name)
      ("heater" (set-face-attribute 'default nil :family magic_rb/fixed-width-font :slant 'normal :height 105))
      ("omen" (set-face-attribute 'default nil :family magic_rb/fixed-width-font :slant 'normal :height 105)))
    (set-face-attribute 'fixed-pitch nil :family magic_rb/fixed-width-font :slant 'normal :height 1.0)
    (set-face-attribute 'variable-pitch nil :family magic_rb/variable-pitch-font :height 1.0))
  (magic_rb/apply-fonts)

Load Modus Vivendi, but change the background color to not-black, it's a bit less depressing and in my opinion nicer on the eyes.

  (setq modus-vivendi-theme-override-colors-alist
        '(("bg-main" . "#111519")))
  (load-theme 'modus-vivendi t)

Enable doom-modeline, much better than the default and unlike powerline it's usable with TRAMP, so that's great.

  (use-package doom-modeline
    :straight t
    :config
    (doom-modeline-mode))

Only show buffer encoding conditionally, there's no reason to have LF UTF-8 down there, rather only show when the encoding is something we don't expect, like CRLF or UTF-16. Inspired by tecosaur.

  (defun tecosaur/doom-modeline-conditional-buffer-encoding ()
    "We expect the encoding to be LF UTF-8, so only show the modeline when this is not the case"
    (setq-local doom-modeline-buffer-encoding
                (unless (or (eq buffer-file-coding-system 'utf-8-unix)
                            (eq buffer-file-coding-system 'utf-8)))))

  (add-hook 'after-change-major-mode-hook #'tecosaur/doom-modeline-conditional-buffer-encoding)

Disable GTK decorations, they're not that great looking and I don't really want to have Emacs affected by GTK themes.

  (if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
  (menu-bar-mode -1)
  (scroll-bar-mode -1)

Load all-the-icons, it's required used by treemacs and doom-modeline. You also must run all-the-icons-install-fonts if you haven't already.

  (use-package all-the-icons
    :straight t)