blob: 534fe07fabeb9db15b42c745db236d46333e3082 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
;;; early-init.el --- Early init file for MMOSMacs -*- lexical-binding: t; -*-
;;
;;; Commentary:
;; 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.
;;; Code:
;; ---------------------------------------------------------------------
;;; Performance hacks
;; ------------------
;; These hacks subjectively make Emacs perform "better"
;; ---------------------------------------------------------------------
;; ---------------------------------
;; GCMH
;; ----
;; Garbage Collector Magic Hack
;; ---------------------------------
;; Defer garbage collection until later in the startup process
(setq gc-cons-threshold most-positive-fixnum
gc-cons-percentage 0.6)
;; ---------------------------------------------------------------------
;;; 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)
;; ---------------------------------
;; Maximize frame on startup
;; -------------------------
;; Resizing is one of the primary
;; sources of visual glitching, and
;; an expensive part of startup.
;; ---------------------------------
(push '(fullscreen . maximized) initial-frame-alist)
(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 "#0a0a0a" :foreground "#c6a57b")
;; ---------------------------------------------------------------------
;;; Package Management
;; -------------------
;; Only one thing should be here. I only wrote this description so the
;; formatting would be consistent. It's a useless comment. Something
;; something package management.
;; ---------------------------------------------------------------------
;; ---------------------------------
;; Disable package manager
;; -----------------------
;; Disable the built-in package
;; manager (`package.el'), because
;; MMOSMacs will be using
;; `straight.el'
;; ---------------------------------
(setq package-enable-at-startup nil)
;;; early-init.el ends here
|