dotfiles/emacs/.emacs.d/config/init-ui.el
Jeremy Dormitzer 6b4430b854 Optimize Emacs startup and UI settings
Streamlined startup by optimizing garbage collection, UI elements, and performance settings. Moved redundant configurations from init.el to early-init.el for better startup efficiency. Made adjustments to init-ui.el for better tool-bar handling post-init.
2024-08-12 16:31:11 -04:00

50 lines
1.4 KiB
EmacsLisp

;; -*- lexical-binding: t; -*-
;; For some reason, the tool-bar-mode disabling in early-init.el was leaving the frame title too tall, so
;; toggle it on and off
(add-hook 'after-init-hook
(lambda ()
(tool-bar-mode)
(tool-bar-mode -1)))
(when (fboundp 'mac-auto-operator-composition-mode)
(setq mac-auto-operator-composition-characters
"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
(mac-auto-operator-composition-mode))
;; Doom themes are the best themes!
(use-package doom-themes)
(use-package doom-modeline
:hook
(after-init . doom-modeline-mode)
:custom
(doom-modeline-env-version nil)
(doom-modeline-env-enable-python nil)
(doom-modeline-env-enable-ruby nil)
(doom-modeline-env-enable-perl nil)
(doom-modeline-env-enable-go nil)
(doom-modeline-env-enable-elixir nil)
(doom-modeline-env-enable-rust nil))
;; A small package to hide the mode line
(use-package hide-mode-line
:commands hide-mode-line-mode)
;; A function to set the frame font
(defun set-font (font)
"Set the frame font to `font'"
(interactive (list (completing-read "Font: "
(delete-dups (font-family-list)))))
(set-frame-font font))
(defun text-scale-reset ()
(interactive)
(text-scale-increase 0))
(general-def
"C-c +" #'text-scale-increase
"C-c -" #'text-scale-decrease
"C-c 0" #'text-scale-reset)
(provide 'init-ui)