mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
refactor: revamp whole Emacs.org
This is the first part of consolidating my Emacs and NixOS config into a single file. This commit refactors the whole of Emacs.org and adds more bits of prose to the configuration sections.
This commit is contained in:
parent
5e9c3c398f
commit
bc8c52554d
8 changed files with 7068 additions and 2939 deletions
|
|
@ -1,39 +1,60 @@
|
|||
(defvar swarsel-file-name-handler-alist file-name-handler-alist)
|
||||
(defvar swarsel-vc-handled-backends vc-handled-backends)
|
||||
|
||||
(setq gc-cons-threshold most-positive-fixnum
|
||||
gc-cons-percentage 0.6)
|
||||
gc-cons-percentage 0.6
|
||||
file-name-handler-alist nil
|
||||
vc-handled-backends nil)
|
||||
|
||||
(add-hook 'emacs-startup-hook
|
||||
(lambda ()
|
||||
(progn
|
||||
(setq gc-cons-threshold (* 1000 1000 8)
|
||||
gc-cons-percentage 0.1
|
||||
file-name-handler-alist swarsel-file-name-handler-alist
|
||||
vc-handled-backends swarsel-vc-handled-backends)
|
||||
(fset 'epg-wait-for-status 'ignore)
|
||||
)))
|
||||
|
||||
(tool-bar-mode 0)
|
||||
(menu-bar-mode 0)
|
||||
(scroll-bar-mode 0)
|
||||
|
||||
(setq frame-inhibit-implied-resize t)
|
||||
(setq frame-inhibit-implied-resize t
|
||||
ring-bell-function 'ignore
|
||||
use-dialog-box nil
|
||||
use-file-dialog nil
|
||||
use-short-answers t
|
||||
inhibit-startup-message t
|
||||
inhibit-splash-screen t
|
||||
inhibit-startup-screen t
|
||||
inhibit-x-resources t
|
||||
inhibit-startup-buffer-menu t
|
||||
inhibit-startup-echo-area-message user-login-name ; this needs to be set to the username or it will not have an effect
|
||||
comp-deferred-compilation nil ; compile all Elisp to native code immediately
|
||||
)
|
||||
|
||||
(setq default-frame-alist
|
||||
(append
|
||||
(list
|
||||
'(undecorated . t)
|
||||
'(min-height . 1)
|
||||
'(height . 42)
|
||||
'(min-width . 1)
|
||||
'(width . 100)
|
||||
'(vertical-scroll-bars . nil)
|
||||
'(internal-border-width . 10)
|
||||
'(tool-bar-lines . 0)
|
||||
'(menu-bar-lines . 0))))
|
||||
(setq-default left-margin-width 1
|
||||
right-margin-width 1)
|
||||
|
||||
(setq-default left-margin-width 1
|
||||
right-margin-width 1)
|
||||
(setq-default default-frame-alist
|
||||
(append
|
||||
(list
|
||||
'(undecorated . t) ; no title bar, borders etc.
|
||||
'(background-color . "#1D252C") ; load doom-citylight colors to avoid white flash
|
||||
'(foreground-color . "#A0B3C5") ; load doom-citylight colors to avoid white flash
|
||||
'(vertical-scroll-bars . nil)
|
||||
'(horizontal-scroll-bars . nil)
|
||||
'(internal-border-width . 5)
|
||||
'(tool-bar-lines . 0)
|
||||
'(menu-bar-lines . 0))))
|
||||
|
||||
(add-hook
|
||||
'after-make-frame-functions
|
||||
(defun setup-blah-keys (frame)
|
||||
(with-selected-frame frame
|
||||
(when (display-graphic-p)
|
||||
(define-key input-decode-map (kbd "C-i") [C-i])
|
||||
(define-key input-decode-map (kbd "C-[") [C-lsb])
|
||||
(define-key input-decode-map (kbd "C-m") [C-m])
|
||||
))))
|
||||
|
||||
(defun swarsel/last-buffer () (interactive) (switch-to-buffer nil))
|
||||
(global-set-key (kbd "<C-m>") #'swarsel/last-buffer)
|
||||
|
||||
(setq comp-deferred-compilation nil)
|
||||
(add-hook
|
||||
'after-make-frame-functions
|
||||
(lambda (frame)
|
||||
(with-selected-frame frame
|
||||
(when (display-graphic-p)
|
||||
(define-key input-decode-map (kbd "C-i") [DUMMY-i])
|
||||
(define-key input-decode-map (kbd "C-[") [DUMMY-lsb])
|
||||
(define-key input-decode-map (kbd "C-m") [DUMMY-m])
|
||||
))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue