mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-29 19:46:17 +01:00
7460ca5aa6
Signed-off-by: magic_rb <magic_rb@redalder.org>
109 lines
3.6 KiB
Org Mode
109 lines
3.6 KiB
Org Mode
:PROPERTIES:
|
|
:ID: a26802fe-8bc3-458e-8f06-7cb856fef2cd
|
|
:END:
|
|
#+title: Display Settings
|
|
#+filetags: emacs-load
|
|
|
|
Adjust the font, based on the specific host.
|
|
|
|
#+begin_src emacs-lisp
|
|
(use-package isoevka-font
|
|
:no-require t
|
|
:init
|
|
(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 (&optional frame)
|
|
(interactive)
|
|
(let ((frame (or frame (selected-frame)))
|
|
(mon (alist-get 'name (frame-monitor-attributes (selected-frame))))
|
|
(hostname (system-name)))
|
|
(pcase hostname
|
|
("heater" (set-face-attribute 'default nil :family magic_rb/fixed-width-font :slant 'normal :height 105))
|
|
("omen"
|
|
(pcase mon
|
|
("DP-1-0.6" (set-face-attribute 'default frame :family magic_rb/fixed-width-font :slant 'normal :height 95))
|
|
("eDP-1" (set-face-attribute 'default frame :family magic_rb/fixed-width-font :slant 'normal :height 120)))))
|
|
(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)))
|
|
:config
|
|
;; (push 'magic_rb/apply-fonts window-size-change-functions)
|
|
(push 'magic_rb/apply-fonts after-make-frame-functions))
|
|
#+end_src
|
|
|
|
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.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(use-package modus-vivendi-semi-black
|
|
:no-require t
|
|
:init
|
|
(setq modus-vivendi-theme-override-colors-alist
|
|
'(("bg-main" . "#111519"))))
|
|
#+END_SRC
|
|
|
|
#+begin_src emacs-lisp
|
|
(use-package ef-themes
|
|
:straight t)
|
|
#+end_src
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
(use-package themes
|
|
:no-require t
|
|
:after (ef-themes)
|
|
:config
|
|
(load-theme 'modus-vivendi t t)
|
|
(load-theme 'modus-operandi t t)
|
|
(load-theme 'ef-winter t t)
|
|
(load-theme 'ef-autumn t t)
|
|
(enable-theme 'ef-winter))
|
|
#+end_src
|
|
|
|
#+RESULTS:
|
|
: t
|
|
|
|
Enable ~doom-modeline~, much better than the default and unlike ~powerline~ it's usable with TRAMP, so that's great.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(use-package doom-modeline
|
|
:straight t
|
|
:config
|
|
(doom-modeline-mode))
|
|
#+END_SRC
|
|
|
|
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 [[https://tecosaur.github.io/emacs-config/config.html#theme-modeline][tecosaur]].
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(use-package doom-modeline-conditional-buffer-encoding
|
|
:no-require t
|
|
:init
|
|
(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)))))
|
|
|
|
:hook
|
|
(after-change-major-mode-hook . tecosaur/doom-modeline-conditional-buffer-encoding))
|
|
#+END_SRC
|
|
|
|
Disable GTK decorations, they're not that great looking and I don't really want to have Emacs affected by GTK themes.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
|
|
(menu-bar-mode -1)
|
|
(scroll-bar-mode -1)
|
|
#+END_SRC
|
|
|
|
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.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(use-package all-the-icons
|
|
:straight t)
|
|
#+END_SRC
|