From 3255fe42431e28c12ee794d7e7fe673d3f65f5c3 Mon Sep 17 00:00:00 2001 From: Mountain Man Date: Sun, 9 Apr 2023 16:48:08 -0400 Subject: Create `early-init.el` and `init.el` files --- early-init.el | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 early-init.el (limited to 'early-init.el') diff --git a/early-init.el b/early-init.el new file mode 100644 index 0000000..21ebdea --- /dev/null +++ b/early-init.el @@ -0,0 +1,6 @@ +;;; -*- lexical-binding: t; -*- +;;; init.el +;; +;; Early Init file for MMOSMacs. This is loaded before the GUI and +;; package system are initialized. This should contain only what +;; absolutely must be in Early Init. -- cgit v1.2.3 From f9f89304ba6c0f789ecab08fbc23991a302052e3 Mon Sep 17 00:00:00 2001 From: Mountain Man Date: Sun, 9 Apr 2023 17:51:57 -0400 Subject: Disable superfluous UI elements in Early Init MMOSMacs is a keyboard-centric environment, there is no use for mouse-centric UI elements such as tool-bars and menu-bars. They are now disabled. This is done in Early Init to prevent them from being initialized in the first place, to prevent visual stutter. --- early-init.el | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'early-init.el') diff --git a/early-init.el b/early-init.el index 21ebdea..24b53b0 100644 --- a/early-init.el +++ b/early-init.el @@ -1,6 +1,37 @@ ;;; -*- lexical-binding: t; -*- -;;; init.el +;;; early-init.el ;; ;; Early Init file for MMOSMacs. This is loaded before the GUI and ;; package system are initialized. This should contain only what ;; absolutely must be in Early Init. + + +;; --------------------------------------------------------------------- +;;; UI Adjustments +;; --------------- +;; The primary goal of this Section is to prevent Emacs from flashing or +;; stuttering visually on startup. +;; +;; If these customizations were placed in `init.el', as is the norm, +;; Emacs would initialize the UI elements, then make whatever +;; customizations we wrote. +;; +;; By placing the customizations here, they are applied before the UI is +;; initialized, preventing any visual glitches altogether. +;; --------------------------------------------------------------------- + +;; --------------------------------- +;; Disable superfluous UI elements +;; ------------------------------- +;; These UI elements are useless in +;; a keyboard-centric environment. +;; --------------------------------- + +;; Disable the menu bar +(push '(menu-bar-lines . 0) default-frame-alist) + +;; Disable the tool-bar +(push '(tool-bar-lines . 0) default-frame-alist) + +;; Disable scroll bars +(push '(vertical-scroll-bars . 0) default-frame-alist) -- cgit v1.2.3 From ef2ff9814984734d98f9c2f7c58262925a743e91 Mon Sep 17 00:00:00 2001 From: Mountain Man Date: Sun, 9 Apr 2023 18:06:59 -0400 Subject: Maximize frame in Early Init Resizing is a major source of visual glitching on startup. Maximizing the frame during Early Init prevents this. --- early-init.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'early-init.el') diff --git a/early-init.el b/early-init.el index 24b53b0..9b5474f 100644 --- a/early-init.el +++ b/early-init.el @@ -35,3 +35,16 @@ ;; Disable scroll bars (push '(vertical-scroll-bars . 0) default-frame-alist) + + +;; --------------------------------- +;; Maximize frame on startup +;; ------------------------- +;; Resizing is one of the primary +;; sources of visual glitching. +;; --------------------------------- + +(push '(fullscreen . maximized) initial-frame-alist) +(push '(ns-transparent-titlebar . t) default-frame-alist) +(setq frame-inhibit-implied-resize t + frame-resize-pixelwise t) -- cgit v1.2.3 From abcd8909298e5c601804c805be3f561be1f8273f Mon Sep 17 00:00:00 2001 From: Mountain Man Date: Sun, 9 Apr 2023 18:20:35 -0400 Subject: Set a black background in Early Init Whoever decided to use white for everything deserve a stern talking-to. Black should be the default background for everything. --- early-init.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'early-init.el') diff --git a/early-init.el b/early-init.el index 9b5474f..37222a4 100644 --- a/early-init.el +++ b/early-init.el @@ -48,3 +48,13 @@ (push '(ns-transparent-titlebar . t) default-frame-alist) (setq frame-inhibit-implied-resize t frame-resize-pixelwise t) + + +;; --------------------------------- +;; Start with a black background +;; ----------------------------- +;; This is necessary to prevent eye +;; damage +;; --------------------------------- + +(set-face-attribute 'default nil :background "#000000" :foreground "#FFFFFF") -- cgit v1.2.3