-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.el
67 lines (54 loc) · 2.07 KB
/
init.el
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
;;; init.el --- Bootstrap Emacs Configuration from config.org
;;; Commentary:
;; This initialization script assumes a config.org in the Emacs home directory.
;; If one is present it will perform some basic package manager initialization
;; and bootstrap the configuration there.
;;; Code:
;; Define function for timing startup. Useful for fine tuning.
(defun void/display-startup-time ()
"Time Emacs startup"
(message "Emacs loaded in %s with %d garbage collections."
(format "%.2f seconds" (float-time (time-subtract after-init-time before-init-time)))
gcs-done))
;; Add the timing function to the startup hook
(add-hook 'emacs-startup-hook #'void/display-startup-time)
;; Turn off mouse interface early in startup to avoid momentary display
(when window-system
(menu-bar-mode -1) ;; Disable menu bars
(tool-bar-mode -1) ;; Disable tool bars
(scroll-bar-mode -1) ;; Disable Scroll bars
(tooltip-mode -1)) ;; Disable tool tips
;; Start clean
(setq inhibit-startup-message t)
(setq initial-scratch-message "")
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'use-package)
;; Pull/build Org mode before tangling config
(use-package org
:straight t)
;; Load the config
(org-babel-load-file (concat user-emacs-directory "config.org"))
;; Don't edit my init on me:
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
;; Done initializing, enable Garbage Colletion magic hack
(gcmh-mode 1)
;; Layout the windows
(add-hook 'window-setup-hook 'toggle-frame-fullscreen t)
(evil-window-split)
(evil-window-down 1)
(vterm)
(shrink-window-if-larger-than-buffer)
(evil-window-up 1)
(treemacs)
;;; End: init.el