;; I don't use any of these (menu-bar-mode -1) (tool-bar-mode -1) (scroll-bar-mode -1) ;; Avoid initial flash of light. (defun prot-emacs-re-enable-frame-theme (_frame) "Re-enable active theme, if any, upon FRAME creation. Add this to `after-make-frame-functions' so that new frames do not retain the generic background set by the function `prot-emacs-avoid-initial-flash-of-light'." (when-let* ((theme (car custom-enabled-themes))) (enable-theme theme))) (defun prot-emacs-avoid-initial-flash-of-light () "Avoid flash of light when starting Emacs, if needed. New frames are instructed to call `prot-emacs-re-enable-frame-theme'." (setq mode-line-format nil) (set-face-attribute 'default nil :background "#000000" :foreground "#ffffff") (set-face-attribute 'mode-line nil :background "#000000" :foreground "#ffffff" :box 'unspecified) (add-hook 'after-make-frame-functions #'prot-emacs-re-enable-frame-theme)) (prot-emacs-avoid-initial-flash-of-light) ;; Do not resize when font size changes (setq frame-resize-pixelwise t) ;; By default, start maximized, undecorated (add-to-list 'default-frame-alist '(fullscreen . maximized)) (add-to-list 'default-frame-alist '(undecorated . t)) ;; Name frames to ease switching between them (add-hook 'after-init-hook (lambda () (set-frame-name "main"))) ;; Initialise installed packages, otherwise, basic functions are not ;; available during the initialization stage. (setq package-enable-at-startup t) ;; Do not report warnings. It's too noisy. (setq native-comp-async-report-warnings-errors 'silent) ;; Keep things minimal (setq inhibit-startup-screen t) (setq inhibit-startup-echo-area-message user-login-name)