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

41 lines
1.6 KiB
EmacsLisp

;;; $DOOMDIR/+ui.el -*- lexical-binding: t; -*-
(setq doom-font (font-spec :family "Jetbrains Mono" :size 13))
(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.1)
;; 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)
;; 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))))))