[mpv] Replace MPlayer configuration with mpv
[mina86-dot-files.git] / emacs / early-init.el
blob91ea2b155c3fdbd703ff84f420c063fb2dd5141b
1 ;; early-init.el -- Emacs early configuration file -*- lexical-binding: t -*-
3 ;; Disable GC while Emacs is initialising. We get it back to normal after
4 ;; initialisation is done.
5 (setq gc-cons-threshold most-positive-fixnum
6 gc-cons-percentage 0.5)
7 (add-hook 'after-init-hook (lambda ()
8 (setq gc-cons-threshold (* 64 1024 1024)
9 gc-cons-percentage 0.1)
10 (garbage-collect))
13 ;; Set frame parameters. We do it in early-init to avoid flickering of the
14 ;; initial frame as the settings are applied after its displayed. We could do
15 ;; this by setting the options via X resources but that would spread Emacs
16 ;; configuration into multiple places. It’s cleaner to do it here.
17 (let ((font "-adobe-courier-medium-r-normal-*-10-*-*-*-*-*-iso10646-1"))
18 (setq default-frame-alist `((font . ,font)
19 (left . 0)
20 (top . 0)
21 (fullscreen . fullheight)
22 (width . 80)
23 (right-fringe . 4)
24 (left-fringe . 4)
25 (menu-bar-lines . 0)
26 (tool-bar-lines . 0)
27 (vertical-scroll-bars)
28 (foreground-color . "gray")
29 (background-color . "black")
30 (background-mode . dark)
31 (wait-for-wm . nil))
32 initial-frame-alist default-frame-alist)
33 (set-face-attribute 'default nil :font font))
35 (setq frame-resize-pixelwise t
36 frame-inhibit-implied-resize t)
38 ;; Ignore X resources. Everything we care about is already set above.
39 (advice-add #'x-apply-session-resources :override #'ignore)
41 ;; Ignore site-start and default initialisation files if they exist. Whatever
42 ;; they include, we’re overriding or don’t care about.
43 ;(setq site-run-file nil
44 ; inhibit-default-init t)
46 (provide 'early-init)