Clean up early-init.el and whitespace
This commit is contained in:
parent
450599d914
commit
d9063ef9d6
|
@ -26,24 +26,22 @@
|
||||||
(require 'acdw-frame)
|
(require 'acdw-frame)
|
||||||
|
|
||||||
;;; Frame settings
|
;;; Frame settings
|
||||||
(setq default-frame-alist ; Remove most UI
|
(setq default-frame-alist
|
||||||
`((tool-bar-lines . 0) ; No tool bar
|
`((tool-bar-lines . 0)
|
||||||
(menu-bar-lines . 0) ; No menu bar
|
(menu-bar-lines . 0)
|
||||||
(vertical-scroll-bars) ; No scroll bars
|
(vertical-scroll-bars . nil)
|
||||||
(horizontal-scroll-bars) ; ... at all
|
(horizontal-scroll-bars . nil)
|
||||||
(width . 84) ; A /little/ wider than
|
(width . 84)
|
||||||
; `fill-column' (set later)
|
|
||||||
(height . 30)
|
(height . 30)
|
||||||
(left-fringe . 8) ; Width of fringes
|
(left-fringe . 8)
|
||||||
(right-fringe . 8) ; (8 is default)
|
(right-fringe . 8)
|
||||||
(font . ,(acdw/system
|
(font . ,(acdw/system
|
||||||
(:home "DejaVu Sans Mono 10")
|
(:home "DejaVu Sans Mono 10")
|
||||||
(:work "Consolas 12")
|
(:work "Consolas 12")
|
||||||
(:other "monospace 10"))))
|
(:other "monospace 10"))))
|
||||||
frame-inhibit-implied-resize t ; Don't resize randomly
|
frame-inhibit-implied-resize t
|
||||||
frame-resize-pixelwise t ; Resize by pixels, not chars
|
frame-resize-pixelwise t
|
||||||
inhibit-x-resources t ; Don't load ~/.Xresources
|
inhibit-x-resources t)
|
||||||
)
|
|
||||||
|
|
||||||
(add-hook 'after-init-hook
|
(add-hook 'after-init-hook
|
||||||
(defun after-init@disable-ui-modes ()
|
(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
|
(add-hook 'after-make-frame-functions
|
||||||
(defun after-make-frame@setup (&rest args)
|
(defun after-make-frame@setup (&rest args)
|
||||||
(ignore args)
|
(ignore args)
|
||||||
(let ((monospace-faces
|
(let ((fixed-pitch-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))))
|
|
||||||
'((:font "Fantasque Sans Mono" :height 110)
|
'((:font "Fantasque Sans Mono" :height 110)
|
||||||
(:font "Go Mono" :height 100)
|
(:font "Go Mono" :height 100)
|
||||||
(:font "DejaVu Sans Mono" :height 110)
|
(:font "DejaVu Sans Mono" :height 110)
|
||||||
(:font "monospace" :height 100))))
|
(:font "monospace" :height 100)))
|
||||||
(acdw/set-first-face-attribute 'default monospace-faces)
|
(variable-pitch-faces
|
||||||
(acdw/set-first-face-attribute 'fixed-pitch monospace-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
|
(acdw/set-first-face-attribute 'variable-pitch
|
||||||
'((:font "Comic Neue" :height 125)
|
variable-pitch-faces))
|
||||||
(:font "Inter" :height 120)
|
|
||||||
(:font "Go" :height 120)
|
|
||||||
(:font "sans-serif"
|
|
||||||
:height 100))))
|
|
||||||
(acdw/set-emoji-fonts "Noto Color Emoji"
|
(acdw/set-emoji-fonts "Noto Color Emoji"
|
||||||
"Noto Emoji"
|
"Noto Emoji"
|
||||||
"Segoe UI 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')
|
;;; Bootstrap package manager (`straight.el')
|
||||||
|
|
||||||
;; 1. Update `exec-path'.
|
;; Set `package' and `straight' variables.
|
||||||
(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.
|
|
||||||
(setq package-enable-at-startup nil
|
(setq package-enable-at-startup nil
|
||||||
package-quickstart nil
|
package-quickstart nil
|
||||||
straight-host-usernames '((github . "duckwork")
|
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-base-dir (acdw/dir)
|
||||||
straight-check-for-modifications '(check-on-save find-when-checking))
|
straight-check-for-modifications '(check-on-save find-when-checking))
|
||||||
|
|
||||||
;; 3. Bootstrap `straight'.
|
;; Bootstrap `straight'.
|
||||||
(defvar bootstrap-version)
|
(defvar bootstrap-version)
|
||||||
(let ((bootstrap-file
|
(let ((bootstrap-file
|
||||||
(expand-file-name
|
(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/
|
;; These packages are here because they need to be loaded /before/
|
||||||
;; everything else in init.el.
|
;; 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 'setup)
|
||||||
(require 'acdw-setup)
|
(require 'acdw-setup)
|
||||||
|
|
||||||
|
|
8
init.el
8
init.el
|
@ -1243,8 +1243,8 @@ specific to most general, they are these:
|
||||||
(crux-reopen-as-root-mode +1))
|
(crux-reopen-as-root-mode +1))
|
||||||
|
|
||||||
(setup (:straight-if (define-repeat-map
|
(setup (:straight-if (define-repeat-map
|
||||||
:host nil
|
:host nil
|
||||||
:repo "https://tildegit.org/acdw/define-repeat-map.el")
|
:repo "https://tildegit.org/acdw/define-repeat-map.el")
|
||||||
(acdw/system :home))
|
(acdw/system :home))
|
||||||
|
|
||||||
(defun acdw/other-window-or-switch-buffer-backward ()
|
(defun acdw/other-window-or-switch-buffer-backward ()
|
||||||
|
@ -1883,8 +1883,8 @@ the default is \"/\"."
|
||||||
for n from 0
|
for n from 0
|
||||||
collect (el-patch-swap
|
collect (el-patch-swap
|
||||||
(org-add-props
|
(org-add-props
|
||||||
head nil '`face
|
head nil '`face
|
||||||
(nth (% n org-n-level-faces) org-level-faces))
|
(nth (% n org-n-level-faces) org-level-faces))
|
||||||
head))
|
head))
|
||||||
separator))))
|
separator))))
|
||||||
(when (> (length fpath) width)
|
(when (> (length fpath) width)
|
||||||
|
|
Loading…
Reference in New Issue