dotfiles/doom/.config/doom/+ui.el

65 lines
2.2 KiB
EmacsLisp

;;; $DOOMDIR/+ui.el -*- lexical-binding: t; -*-
(setq doom-font (font-spec :family "Jetbrains Mono" :size 13))
(if (string-match "tycho" (system-name))
(setq doom-font (font-spec :family "Jetbrains Mono" :size 18)))
(setq doom-theme 'doom-gruvbox)
(menu-bar-mode +1) ; add back menu bar
(setq display-line-numbers-type 'relative) ; line numbers
;; slightly nicer default buffer names
(setq doom-fallback-buffer-name "► Doom"
+doom-dashboard-name "► Doom")
;; pop-ups
(setq which-key-idle-delay 0.25)
(setq company-idle-delay 0.25)
;; centaur tabs issue: https://github.com/ema2159/centaur-tabs/issues/181
(after! centaur-tabs
(centaur-tabs-group-by-projectile-project))
;; From Tecosaur's config: hide encoding in modeline if usual
(defun 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 (and (memq (plist-get (coding-system-plist buffer-file-coding-system) :category)
'(coding-category-undecided coding-category-utf-8))
(not (memq (coding-system-eol-type buffer-file-coding-system) '(1 2))))
t)))
(add-hook 'after-change-major-mode-hook #'doom-modeline-conditional-buffer-encoding)
;; https://github.com/doomemacs/doomemacs/issues/314
(after! doom-modeline
(setq doom-modeline-persp-name t))
;; pdf-tools
;; Always use midnight view with pdf-tools
(add-hook 'pdf-tools-enabled-hook 'pdf-view-midnight-minor-mode)
;; Also from Tecosaur's config (modified slightly): better window title
(setq frame-title-format
'(""
"%b" ; removed the org-roam part
(:eval
(let ((project-name (projectile-project-name)))
(unless (string= "-" project-name)
(format (if (buffer-modified-p) " ◉ %s" "  ●  %s") project-name))))))
;; emojify: Was a workaround for
;; https://github.com/iqbalansari/emacs-emojify/issues/100, but keep for
;; simplicity.
(setq emojify-download-emojis-p t)
(use-package auto-dark
:config
(setq auto-dark-allow-osascript t)
(setq auto-dark-dark-theme 'doom-gruvbox)
(setq auto-dark-light-theme 'doom-gruvbox-light)
(auto-dark-mode t))