2023-11-15 00:07:16 +01:00
|
|
|
|
2023-11-14 23:25:05 +01:00
|
|
|
(setq native-comp-async-report-warnings-errors nil)
|
|
|
|
(setq package-enable-at-startup nil)
|
|
|
|
(setq frame-inhibit-implied-resize t)
|
2023-11-20 14:14:23 +01:00
|
|
|
(defvar materus/init-early nil)
|
|
|
|
(unless materus/init-early
|
|
|
|
(tool-bar-mode -1)
|
|
|
|
(setq initial-major-mode 'fundamental-mode)
|
|
|
|
(setq-default package-quickstart t)
|
|
|
|
(setq native-comp-speed 3)
|
|
|
|
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
|
|
|
|
(setq gc-cons-threshold 100000000 ; ~100mb
|
|
|
|
gc-cons-percentage 0.1)
|
|
|
|
))
|
|
|
|
(unless (daemonp)
|
|
|
|
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
|
|
|
|
gc-cons-percentage 0.6)
|
|
|
|
(setq package-enable-at-startup nil)
|
|
|
|
|
|
|
|
(advice-add #'tty-run-terminal-initialization :override #'ignore)
|
|
|
|
(add-hook 'window-setup-hook
|
|
|
|
(lambda ()
|
|
|
|
(advice-remove #'tty-run-terminal-initialization #'ignore)
|
|
|
|
(tty-run-terminal-initialization (selected-frame) nil t)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(setq auto-save-list-file-prefix (concat user-emacs-directory "backups/"))
|
|
|
|
(setq backup-directory-alist
|
|
|
|
`(("." . ,(concat user-emacs-directory "backups/"))))
|
2023-11-13 00:44:03 +01:00
|
|
|
|
|
|
|
(require 'telephone-line)
|
|
|
|
(require 'elcord)
|
|
|
|
(require 'dashboard)
|
|
|
|
(require 'minions)
|
2023-11-14 23:25:05 +01:00
|
|
|
(require 'doom-themes)
|
2023-11-13 00:44:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
;Graphical
|
2024-10-27 22:00:57 +01:00
|
|
|
(setq frame-resize-pixelwise t)
|
2023-11-13 00:44:03 +01:00
|
|
|
(when (display-graphic-p)
|
2024-04-05 21:57:37 +02:00
|
|
|
(set-frame-font "Hack Nerd Font" nil t)
|
2023-11-13 00:44:03 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-20 14:14:23 +01:00
|
|
|
(setq read-process-output-max (* 1024 1024 3))
|
2023-11-13 00:44:03 +01:00
|
|
|
(setq custom-file (concat user-emacs-directory "custom.el"))
|
|
|
|
(when (or (not (display-graphic-p)) (daemonp))
|
|
|
|
(xterm-mouse-mode 1)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
(tool-bar-mode -1)
|
2023-11-14 23:25:05 +01:00
|
|
|
(load-theme 'doom-horizon t)
|
2023-11-13 00:44:03 +01:00
|
|
|
|
|
|
|
(setq ring-bell-function 'ignore)
|
|
|
|
(setq-default cursor-type '(bar . 1))
|
|
|
|
(pixel-scroll-precision-mode 1)
|
|
|
|
|
|
|
|
(setq mouse-wheel-follow-mouse 't)
|
|
|
|
(setq scroll-step 1)
|
|
|
|
(setq mouse-drag-and-drop-region t)
|
|
|
|
(telephone-line-mode 1)
|
|
|
|
(setq-default pixel-scroll-precision-large-scroll-height 10.0)
|
|
|
|
(minions-mode 1)
|
|
|
|
(elcord-mode)
|
|
|
|
|
|
|
|
;Hide startup screen if started with file
|
|
|
|
(defun startup-screen-advice (orig-fun &rest args)
|
|
|
|
(when (= (seq-count #'buffer-file-name (buffer-list)) 0)
|
|
|
|
(apply orig-fun args)))
|
|
|
|
(advice-add 'display-startup-screen :around #'startup-screen-advice)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;Enable dashboard
|
|
|
|
(setq dashboard-center-content t)
|
|
|
|
(dashboard-setup-startup-hook)
|
|
|
|
(when (daemonp)
|
|
|
|
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ; Show dashboard when emacs is running as daemon
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;CUA
|
|
|
|
(cua-mode 1)
|
|
|
|
(global-set-key (kbd "C-y") 'undo-redo)
|
|
|
|
|
|
|
|
;(define-key key-translation-map [8711] 'event-apply-hyper-modifier )
|
|
|
|
;(global-set-key (kbd "C-∇") (kbd "C-H"))
|
|
|
|
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))
|