Clean up early-init.el and whitespace

This commit is contained in:
Case Duckworth 2021-09-25 13:16:09 -05:00
parent 450599d914
commit d9063ef9d6
2 changed files with 33 additions and 51 deletions

View File

@ -26,24 +26,22 @@
(require 'acdw-frame)
;;; Frame settings
(setq default-frame-alist ; Remove most UI
`((tool-bar-lines . 0) ; No tool bar
(menu-bar-lines . 0) ; No menu bar
(vertical-scroll-bars) ; No scroll bars
(horizontal-scroll-bars) ; ... at all
(width . 84) ; A /little/ wider than
; `fill-column' (set later)
(setq default-frame-alist
`((tool-bar-lines . 0)
(menu-bar-lines . 0)
(vertical-scroll-bars . nil)
(horizontal-scroll-bars . nil)
(width . 84)
(height . 30)
(left-fringe . 8) ; Width of fringes
(right-fringe . 8) ; (8 is default)
(left-fringe . 8)
(right-fringe . 8)
(font . ,(acdw/system
(:home "DejaVu Sans Mono 10")
(:work "Consolas 12")
(:other "monospace 10"))))
frame-inhibit-implied-resize t ; Don't resize randomly
frame-resize-pixelwise t ; Resize by pixels, not chars
inhibit-x-resources t ; Don't load ~/.Xresources
)
frame-inhibit-implied-resize t
frame-resize-pixelwise t
inhibit-x-resources t)
(add-hook 'after-init-hook
(defun after-init@disable-ui-modes ()
@ -64,26 +62,23 @@ say, `tool-bar-mode' once to toggle the tool bar back on."
(add-hook 'after-make-frame-functions
(defun after-make-frame@setup (&rest args)
(ignore args)
(let ((monospace-faces
;; (acdw/system
;; (:work '((:font "Consolas" :height 110)
;; (:font "DejaVu Sans Mono" :height 110)
;; (:font "monospace" :height 110)))
;; (_ '((:font "DejaVu Sans Mono" :height 100)
;; (:font "Consolas" :height 100)
;; (:font "monospace" :height 100))))
(let ((fixed-pitch-faces
'((:font "Fantasque Sans Mono" :height 110)
(:font "Go Mono" :height 100)
(:font "DejaVu Sans Mono" :height 110)
(:font "monospace" :height 100))))
(acdw/set-first-face-attribute 'default monospace-faces)
(acdw/set-first-face-attribute 'fixed-pitch monospace-faces)
(:font "monospace" :height 100)))
(variable-pitch-faces
'((:font "Comic Neue" :height 125)
(:font "Inter" :height 120)
(:font "Go" :height 120)
(:font "sans-serif"
:height 100))))
(acdw/set-first-face-attribute 'default
fixed-pitch-faces)
(acdw/set-first-face-attribute 'fixed-pitch
fixed-pitch-faces)
(acdw/set-first-face-attribute 'variable-pitch
'((:font "Comic Neue" :height 125)
(:font "Inter" :height 120)
(:font "Go" :height 120)
(:font "sans-serif"
:height 100))))
variable-pitch-faces))
(acdw/set-emoji-fonts "Noto Color Emoji"
"Noto Emoji"
"Segoe UI Emoji"
@ -125,22 +120,7 @@ say, `tool-bar-mode' once to toggle the tool bar back on."
;;; Bootstrap package manager (`straight.el')
;; 1. Update `exec-path'.
(dolist (path (list (expand-file-name "bin" user-emacs-directory)
(expand-file-name "~/bin")
(expand-file-name "~/.local/bin")
(expand-file-name "~/usr/bin")
(expand-file-name "~/cmd")
(expand-file-name "~/mingw64/bin")
(expand-file-name "~/clisp-2.49"))
exec-path)
(when (file-exists-p path)
(add-to-list 'exec-path path :append)))
;; 1.5. Update $PATH to reflect changes.
(setenv "PATH" (mapconcat #'identity exec-path path-separator))
;; 2. Set `package' and `straight' variables.
;; Set `package' and `straight' variables.
(setq package-enable-at-startup nil
package-quickstart nil
straight-host-usernames '((github . "duckwork")
@ -148,7 +128,7 @@ say, `tool-bar-mode' once to toggle the tool bar back on."
straight-base-dir (acdw/dir)
straight-check-for-modifications '(check-on-save find-when-checking))
;; 3. Bootstrap `straight'.
;; Bootstrap `straight'.
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name
@ -189,7 +169,9 @@ say, `tool-bar-mode' once to toggle the tool bar back on."
;; These packages are here because they need to be loaded /before/
;; everything else in init.el.
(straight-use-package '(setup :host nil :repo "https://git.sr.ht/~pkal/setup"))
(straight-use-package '(setup
:host nil
:repo "https://git.sr.ht/~pkal/setup"))
(require 'setup)
(require 'acdw-setup)

View File

@ -1243,8 +1243,8 @@ specific to most general, they are these:
(crux-reopen-as-root-mode +1))
(setup (:straight-if (define-repeat-map
:host nil
:repo "https://tildegit.org/acdw/define-repeat-map.el")
:host nil
:repo "https://tildegit.org/acdw/define-repeat-map.el")
(acdw/system :home))
(defun acdw/other-window-or-switch-buffer-backward ()
@ -1883,8 +1883,8 @@ the default is \"/\"."
for n from 0
collect (el-patch-swap
(org-add-props
head nil '`face
(nth (% n org-n-level-faces) org-level-faces))
head nil '`face
(nth (% n org-n-level-faces) org-level-faces))
head))
separator))))
(when (> (length fpath) width)