diff options
| -rw-r--r-- | .gitignore | 0 | ||||
| -rw-r--r-- | early-init.el | 60 | ||||
| -rwxr-xr-x | eln-cache/28.2-64ac1258/subr--trampoline-7965732d6f722d6e6f2d70_yes_or_no_p_0.eln | bin | 0 -> 15920 bytes | |||
| -rw-r--r-- | init.el | 107 |
4 files changed, 167 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.gitignore | |||
diff --git a/early-init.el b/early-init.el new file mode 100644 index 0000000..37222a4 --- /dev/null +++ b/early-init.el | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | ;;; -*- lexical-binding: t; -*- | ||
| 2 | ;;; early-init.el | ||
| 3 | ;; | ||
| 4 | ;; Early Init file for MMOSMacs. This is loaded before the GUI and | ||
| 5 | ;; package system are initialized. This should contain only what | ||
| 6 | ;; absolutely must be in Early Init. | ||
| 7 | |||
| 8 | |||
| 9 | ;; --------------------------------------------------------------------- | ||
| 10 | ;;; UI Adjustments | ||
| 11 | ;; --------------- | ||
| 12 | ;; The primary goal of this Section is to prevent Emacs from flashing or | ||
| 13 | ;; stuttering visually on startup. | ||
| 14 | ;; | ||
| 15 | ;; If these customizations were placed in `init.el', as is the norm, | ||
| 16 | ;; Emacs would initialize the UI elements, then make whatever | ||
| 17 | ;; customizations we wrote. | ||
| 18 | ;; | ||
| 19 | ;; By placing the customizations here, they are applied before the UI is | ||
| 20 | ;; initialized, preventing any visual glitches altogether. | ||
| 21 | ;; --------------------------------------------------------------------- | ||
| 22 | |||
| 23 | ;; --------------------------------- | ||
| 24 | ;; Disable superfluous UI elements | ||
| 25 | ;; ------------------------------- | ||
| 26 | ;; These UI elements are useless in | ||
| 27 | ;; a keyboard-centric environment. | ||
| 28 | ;; --------------------------------- | ||
| 29 | |||
| 30 | ;; Disable the menu bar | ||
| 31 | (push '(menu-bar-lines . 0) default-frame-alist) | ||
| 32 | |||
| 33 | ;; Disable the tool-bar | ||
| 34 | (push '(tool-bar-lines . 0) default-frame-alist) | ||
| 35 | |||
| 36 | ;; Disable scroll bars | ||
| 37 | (push '(vertical-scroll-bars . 0) default-frame-alist) | ||
| 38 | |||
| 39 | |||
| 40 | ;; --------------------------------- | ||
| 41 | ;; Maximize frame on startup | ||
| 42 | ;; ------------------------- | ||
| 43 | ;; Resizing is one of the primary | ||
| 44 | ;; sources of visual glitching. | ||
| 45 | ;; --------------------------------- | ||
| 46 | |||
| 47 | (push '(fullscreen . maximized) initial-frame-alist) | ||
| 48 | (push '(ns-transparent-titlebar . t) default-frame-alist) | ||
| 49 | (setq frame-inhibit-implied-resize t | ||
| 50 | frame-resize-pixelwise t) | ||
| 51 | |||
| 52 | |||
| 53 | ;; --------------------------------- | ||
| 54 | ;; Start with a black background | ||
| 55 | ;; ----------------------------- | ||
| 56 | ;; This is necessary to prevent eye | ||
| 57 | ;; damage | ||
| 58 | ;; --------------------------------- | ||
| 59 | |||
| 60 | (set-face-attribute 'default nil :background "#000000" :foreground "#FFFFFF") | ||
diff --git a/eln-cache/28.2-64ac1258/subr--trampoline-7965732d6f722d6e6f2d70_yes_or_no_p_0.eln b/eln-cache/28.2-64ac1258/subr--trampoline-7965732d6f722d6e6f2d70_yes_or_no_p_0.eln new file mode 100755 index 0000000..fc27aca --- /dev/null +++ b/eln-cache/28.2-64ac1258/subr--trampoline-7965732d6f722d6e6f2d70_yes_or_no_p_0.eln | |||
| Binary files differ | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | ;;; -*- lexical-binding: t; -*- | ||
| 2 | ;;; init.el | ||
| 3 | ;; | ||
| 4 | ;; Main configuration file for MMOSMacs. | ||
| 5 | |||
| 6 | |||
| 7 | ;; --------------------------------------------------------------------- | ||
| 8 | ;;; File Management | ||
| 9 | ;; ---------------- | ||
| 10 | ;; Everything to do with file or directory management goes here. | ||
| 11 | ;; --------------------------------------------------------------------- | ||
| 12 | |||
| 13 | ;; --------------------------------- | ||
| 14 | ;; Disable backups | ||
| 15 | ;; --------------- | ||
| 16 | ;; By default, Emacs saves backup | ||
| 17 | ;; files, adding a `~' to the name. | ||
| 18 | ;; Stop saving them. | ||
| 19 | ;; --------------------------------- | ||
| 20 | |||
| 21 | (setq backup-inhibited t) | ||
| 22 | |||
| 23 | |||
| 24 | ;; --------------------------------- | ||
| 25 | ;; Disable auto-saves | ||
| 26 | ;; ------------------ | ||
| 27 | ;; Auto-saves are the files with | ||
| 28 | ;; hashes before and after the name. | ||
| 29 | ;; They should not exist. | ||
| 30 | ;; --------------------------------- | ||
| 31 | |||
| 32 | (setq auto-save-default nil ; don't create auto-saves | ||
| 33 | auto-save-list-file-prefix nil) ; don't create auto-save-list dir | ||
| 34 | |||
| 35 | |||
| 36 | ;; --------------------------------- | ||
| 37 | ;; Disable lockfiles | ||
| 38 | ;; ----------------- | ||
| 39 | ;; Sometimes I want to edit a locked | ||
| 40 | ;; file. I can handle myself, let me | ||
| 41 | ;; do what I want. | ||
| 42 | ;; --------------------------------- | ||
| 43 | |||
| 44 | (setq create-lockfiles nil) | ||
| 45 | |||
| 46 | |||
| 47 | |||
| 48 | |||
| 49 | ;; --------------------------------------------------------------------- | ||
| 50 | ;;; Keybinds | ||
| 51 | ;; --------- | ||
| 52 | ;; For now, just a few simple changes. | ||
| 53 | ;; In the future there will be whole custom keybind system. | ||
| 54 | ;; --------------------------------------------------------------------- | ||
| 55 | |||
| 56 | ;; --------------------------------- | ||
| 57 | ;; Fix ESC behavior | ||
| 58 | ;; ---------------- | ||
| 59 | ;; The default behavior of the ESC | ||
| 60 | ;; key is atrocious. Why in God's | ||
| 61 | ;; name would I want it to close all | ||
| 62 | ;; my windows when I press it twice? | ||
| 63 | ;; | ||
| 64 | ;; This fixes the behavior to do | ||
| 65 | ;; what ESC should do: "escape" the | ||
| 66 | ;; current thing I'm doing, like the | ||
| 67 | ;; minibuffer or a popup window. | ||
| 68 | ;; --------------------------------- | ||
| 69 | |||
| 70 | ;; Define fixed version of `keyboard-escape-quit' which does not close | ||
| 71 | ;; windows or change their layout. | ||
| 72 | (defun mm/keyboard-escape-quit-keep-windows () | ||
| 73 | "Alternative version of `keyboard-escape-quit' that does not change window layout." | ||
| 74 | (interactive) | ||
| 75 | (cond ((eq last-command 'mode-exited) nil) | ||
| 76 | ((region-active-p) | ||
| 77 | (deactivate-mark)) | ||
| 78 | ((> (minibuffer-depth) 0) | ||
| 79 | (abort-recursive-edit)) | ||
| 80 | (current-prefix-arg | ||
| 81 | nil) | ||
| 82 | ((> (recursion-depth) 0) | ||
| 83 | (exit-recursive-edit)) | ||
| 84 | (buffer-quit-function | ||
| 85 | (funcall buffer-quit-function)) | ||
| 86 | ;; The following lines are from `keyboard-escape-quit'. | ||
| 87 | ;; They have been commented to disable the unwanted behavior | ||
| 88 | ;; ((not (one-window-p t)) | ||
| 89 | ;; (delete-other-windows) | ||
| 90 | ((string-match "^ \\*" (buffer-name (current-buffer))) | ||
| 91 | bury-buffer))) | ||
| 92 | |||
| 93 | ;; Fix the keybinds for the ESC key | ||
| 94 | (global-set-key (kbd "<escape>") 'mm/keyboard-escape-quit-keep-windows) | ||
| 95 | (global-unset-key (kbd "C-x ESC ESC")) | ||
| 96 | |||
| 97 | |||
| 98 | ;; --------------------------------- | ||
| 99 | ;; Replace yes/no prompts with y/n | ||
| 100 | ;; ------------------------------- | ||
| 101 | ;; It's too much to ask for me to | ||
| 102 | ;; type 3 whole letters to confirm | ||
| 103 | ;; something. I demand to only have | ||
| 104 | ;; to press a single key. | ||
| 105 | ;; --------------------------------- | ||
| 106 | |||
| 107 | (defalias 'yes-or-no-p 'y-or-n-p) | ||