dotfiles

shared miscellaneous configuration files between my systems
git clone git://git.shmage.xyz/dotfiles.git
Log | Files | Refs

commit 8a8f813f6760913c36a1ba293b42f0aa6a243020
parent c448e47047126d660f1deb843050a71121a8779f
Author: Ian Ressa <ian@eonn.xyz>
Date:   Sun,  2 Oct 2022 16:38:07 -0400

[emacs] divying up init into a bunch of categorized init files / isolating custom

Diffstat:
M.emacs.d/init.el | 110++++++++++---------------------------------------------------------------------
A.emacs.d/init/org.el | 26++++++++++++++++++++++++++
A.emacs.d/init/packages.el | 27+++++++++++++++++++++++++++
A.emacs.d/init/visual.el | 11+++++++++++
A.emacs.d/themes/eonn-theme.el | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 129 insertions(+), 97 deletions(-)

diff --git a/.emacs.d/init.el b/.emacs.d/init.el @@ -6,106 +6,22 @@ (global-set-key (kbd "C-c c") 'org-capture) (global-set-key (kbd "C-c t") 'org-insert-date) -(setq org-log-done 'time) -(setq org-todo-keywords - '((sequence "TODO(t)" - "NEXT(n)" - "START(s)" - "WAIT(w)" - "DONE(d)" - "CANCEL(c)"))) -(setq org-agenda-custom-commands - '(("c" "Simple agenda view" - ((agenda "") - (alltodo ""))))) -(setq org-capture-templates - '(("t" "TODO") - )) - -(defun org-insert-date () - (interactive) - (require 'org) - (insert (format-time-string "%m-%d-%Y" (org-read-date nil 'to-time nil "Date: ")))) - -(package-initialize) - -;; Transparency -(set-frame-parameter (selected-frame) 'alpha '(85 85)) -(add-to-list 'default-frame-alist '(alpha 85 85)) - -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(custom-enabled-themes '(eonn)) - '(custom-safe-themes - '("762761b289ef903f963b757ee0aee64c1160f67cf70523c4a6e9f94744917225" default)) - '(initial-buffer-choice (or (getenv "PWD") ("~"))) - '(org-agenda-files (list org-directory)) - '(org-capture-templates - '(("t" "Add TODO" entry - (file "~/.org/todo.org") - "* TODO %?")) t) - '(org-directory "~/.org/") - '(org-modules - '(ol-bbdb ol-bibtex ol-docview ol-eww ol-gnus org-habit ol-info ol-irc ol-mhe ol-rmail ol-w3m)) - '(package-selected-packages '(yasnippet-snippets auctex)) - '(safe-local-variable-values - '((eval modify-syntax-entry 43 "'") - (eval modify-syntax-entry 36 "'") - (eval modify-syntax-entry 126 "'") - (eval let - ((root-dir-unexpanded - (locate-dominating-file default-directory ".dir-locals.el"))) - (when root-dir-unexpanded - (let* - ((root-dir - (expand-file-name root-dir-unexpanded)) - (root-dir* - (directory-file-name root-dir))) - (unless - (boundp 'geiser-guile-load-path) - (defvar geiser-guile-load-path 'nil)) - (make-local-variable 'geiser-guile-load-path) - (require 'cl-lib) - (cl-pushnew root-dir* geiser-guile-load-path :test #'string-equal)))) - (eval setq-local guix-directory - (locate-dominating-file default-directory ".dir-locals.el"))))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) +(setq initial-buffer-choice (or (getenv "PWD") ("~"))) (add-to-list 'load-path "/home/ian/.guix-profile/share/emacs/site-lisp") (guix-emacs-autoload-packages) +(package-initialize) -;; ParEdit -(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t) -(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) -(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode) -(add-hook 'ielm-mode-hook #'enable-paredit-mode) -(add-hook 'lisp-mode-hook #'enable-paredit-mode) -(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode) -(add-hook 'scheme-mode-hook #'enable-paredit-mode) -;; - -;; Geiser -(with-eval-after-load 'geiser-guile - (add-to-list 'geiser-guile-load-path "~/repos/guix")) -;; +(defvar init-directory (expand-file-name "~/.emacs.d/init")) +(setq custom-file (format "%s/%s" init-directory "custom.el")) -;; YASnippet -(require 'yasnippet) -(yas-global-mode 1) -(setq yas-snippet-dirs - '("~/.emacs.d/snippets")) -;; +(defun load-init-file (filename) + (let ((location (format "%s/%s%s" init-directory filename ".el"))) + (or (load location 'noerror) + (apply #'message + (concat "the init file does not exist: " location))))) -;; melpa -(require 'package) -(add-to-list 'package-archives - '("melpa" . "http://melpa.org/packages/") t) -;; +(load-init-file "visual") +(load-init-file "org") +(load-init-file "packages") +(load-init-file "custom") diff --git a/.emacs.d/init/org.el b/.emacs.d/init/org.el @@ -0,0 +1,26 @@ +(setq org-log-done 'time) +(setq org-todo-keywords + '((sequence "TODO(t)" + "NEXT(n)" + "START(s)" + "WAIT(w)" + "DONE(d)" + "CANCEL(c)"))) +(setq org-agenda-custom-commands + '(("c" "Simple agenda view" + ((agenda "") + (alltodo ""))))) +(setq org-capture-templates + '(("t" "TODO") + )) + +(defun org-insert-date () + (interactive) + (require 'org) + (insert (format-time-string "%m-%d-%Y" (org-read-date nil 'to-time nil "Date: ")))) + +(with-eval-after-load 'custom + (setq + org-directory "~/.org/" + org-agenda-files (list org-directory) + org-modules '(ol-bbdb ol-bibtex ol-docview ol-eww ol-gnus org-habit ol-info ol-irc ol-mhe ol-rmail ol-w3m))) diff --git a/.emacs.d/init/packages.el b/.emacs.d/init/packages.el @@ -0,0 +1,27 @@ +;; ParEdit +(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t) +(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) +(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode) +(add-hook 'ielm-mode-hook #'enable-paredit-mode) +(add-hook 'lisp-mode-hook #'enable-paredit-mode) +(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode) +(add-hook 'scheme-mode-hook #'enable-paredit-mode) +;; + +;; Geiser +(with-eval-after-load 'geiser-guile + (add-to-list 'geiser-guile-load-path "~/repos/guix")) +;; + +;; YASnippet +(require 'yasnippet) +(yas-global-mode 1) +(setq yas-snippet-dirs + '("~/.emacs.d/snippets")) +;; + +;; melpa +(require 'package) +(add-to-list 'package-archives + '("melpa" . "http://melpa.org/packages/") t) +;; diff --git a/.emacs.d/init/visual.el b/.emacs.d/init/visual.el @@ -0,0 +1,11 @@ +;; Transparency +(set-frame-parameter (selected-frame) 'alpha '(85 85)) +(add-to-list 'default-frame-alist '(alpha 85 85)) + +(setq custom-theme-directory (expand-file-name "~/.emacs.d/themes")) + +(with-eval-after-load 'custom + (setq custom-safe-themes t) + custom-enabled-themes '(eonn default)) + +(load-theme 'eonn) diff --git a/.emacs.d/themes/eonn-theme.el b/.emacs.d/themes/eonn-theme.el @@ -0,0 +1,52 @@ +(deftheme eonn + "Created 2022-09-09.") + +(custom-theme-set-faces + 'eonn + '(cursor ((((background light)) (:background "black")) (((background dark)) (:background "white")))) + '(fixed-pitch ((t (:family "Monospace")))) + '(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif")))) + '(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) + '(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) + '(minibuffer-prompt ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "medium blue")))) + '(highlight ((((class color) (min-colors 88) (background light)) (:background "darkseagreen2")) (((class color) (min-colors 88) (background dark)) (:background "darkolivegreen")) (((class color) (min-colors 16) (background light)) (:background "darkseagreen2")) (((class color) (min-colors 16) (background dark)) (:background "darkolivegreen")) (((class color) (min-colors 8)) (:foreground "black" :background "green")) (t (:inverse-video t)))) + '(region ((((class color) (min-colors 88) (background dark)) (:extend t :background "blue3")) (((class color) (min-colors 88) (background light) (type gtk)) (:extend t :background "gtk_selection_bg_color" :distant-foreground "gtk_selection_fg_color")) (((class color) (min-colors 88) (background light) (type ns)) (:extend t :background "ns_selection_bg_color" :distant-foreground "ns_selection_fg_color")) (((class color) (min-colors 88) (background light)) (:extend t :background "lightgoldenrod2")) (((class color) (min-colors 16) (background dark)) (:extend t :background "blue3")) (((class color) (min-colors 16) (background light)) (:extend t :background "lightgoldenrod2")) (((class color) (min-colors 8)) (:extend t :foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:extend t :background "gray")))) + '(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow")))) + '(secondary-selection ((((class color) (min-colors 88) (background light)) (:extend t :background "yellow1")) (((class color) (min-colors 88) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 16) (background light)) (:extend t :background "yellow")) (((class color) (min-colors 16) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 8)) (:extend t :foreground "black" :background "cyan")) (t (:inverse-video t)))) + '(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t)))) + '(font-lock-builtin-face ((((class grayscale) (background light)) (:weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "dark slate blue")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold)))) + '(font-lock-comment-delimiter-face ((default (:inherit (font-lock-comment-face))))) + '(font-lock-comment-face ((((class grayscale) (background light)) (:slant italic :weight bold :foreground "DimGray")) (((class grayscale) (background dark)) (:slant italic :weight bold :foreground "LightGray")) (((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) (((class color) (min-colors 16) (background light)) (:foreground "red")) (((class color) (min-colors 16) (background dark)) (:foreground "red1")) (((class color) (min-colors 8) (background light)) (:foreground "red")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow")) (t (:slant italic :weight bold)))) + '(font-lock-constant-face ((((class grayscale) (background light)) (:underline (:color foreground-color :style line) :weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:underline (:color foreground-color :style line) :weight bold :foreground "Gray50")) (((class color) (min-colors 88) (background light)) (:foreground "dark cyan")) (((class color) (min-colors 88) (background dark)) (:foreground "Aquamarine")) (((class color) (min-colors 16) (background light)) (:foreground "CadetBlue")) (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) (((class color) (min-colors 8)) (:foreground "magenta")) (t (:underline (:color foreground-color :style line) :weight bold)))) + '(font-lock-doc-face ((t (:inherit (font-lock-string-face))))) + '(font-lock-doc-markup-face ((t (:inherit (font-lock-constant-face))))) + '(font-lock-function-name-face ((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Blue")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold :inverse-video t)))) + '(font-lock-keyword-face ((((class grayscale) (background light)) (:weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "Purple")) (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1")) (((class color) (min-colors 16) (background light)) (:foreground "Purple")) (((class color) (min-colors 16) (background dark)) (:foreground "Cyan")) (((class color) (min-colors 8)) (:weight bold :foreground "cyan")) (t (:weight bold)))) + '(font-lock-negation-char-face ((t nil))) + '(font-lock-preprocessor-face ((t (:inherit (font-lock-builtin-face))))) + '(font-lock-regexp-grouping-backslash ((t (:inherit (bold))))) + '(font-lock-regexp-grouping-construct ((t (:inherit (bold))))) + '(font-lock-string-face ((((class grayscale) (background light)) (:slant italic :foreground "DimGray")) (((class grayscale) (background dark)) (:slant italic :foreground "LightGray")) (((class color) (min-colors 88) (background light)) (:foreground "VioletRed4")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSalmon")) (((class color) (min-colors 16) (background light)) (:foreground "RosyBrown")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon")) (((class color) (min-colors 8)) (:foreground "green")) (t (:slant italic)))) + '(font-lock-type-face ((((class grayscale) (background light)) (:weight bold :foreground "Gray90")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "ForestGreen")) (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) (((class color) (min-colors 16) (background light)) (:foreground "ForestGreen")) (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen")) (((class color) (min-colors 8)) (:foreground "green")) (t (:underline (:color foreground-color :style line) :weight bold)))) + '(font-lock-variable-name-face ((((class grayscale) (background light)) (:slant italic :weight bold :foreground "Gray90")) (((class grayscale) (background dark)) (:slant italic :weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "sienna")) (((class color) (min-colors 88) (background dark)) (:foreground "LightGoldenrod")) (((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod")) (((class color) (min-colors 8)) (:weight light :foreground "yellow")) (t (:slant italic :weight bold)))) + '(font-lock-warning-face ((t (:inherit (error))))) + '(button ((t (:inherit (link))))) + '(link ((((class color) (min-colors 88) (background light)) (:underline (:color foreground-color :style line) :foreground "RoyalBlue3")) (((class color) (background light)) (:underline (:color foreground-color :style line) :foreground "blue")) (((class color) (min-colors 88) (background dark)) (:underline (:color foreground-color :style line) :foreground "cyan1")) (((class color) (background dark)) (:underline (:color foreground-color :style line) :foreground "cyan")) (t (:inherit (underline))))) + '(link-visited ((default (:inherit (link))) (((class color) (background light)) (:foreground "magenta4")) (((class color) (background dark)) (:foreground "violet")))) + '(fringe ((((class color) (background light)) (:background "grey95")) (((class color) (background dark)) (:background "grey10")) (t (:background "gray")))) + '(header-line ((default (:inherit (mode-line))) (((type tty)) (:underline (:color foreground-color :style line) :inverse-video nil)) (((class color grayscale) (background light)) (:box nil :foreground "grey20" :background "grey90")) (((class color grayscale) (background dark)) (:box nil :foreground "grey90" :background "grey20")) (((class mono) (background light)) (:underline (:color foreground-color :style line) :box nil :inverse-video nil :foreground "black" :background "white")) (((class mono) (background dark)) (:underline (:color foreground-color :style line) :box nil :inverse-video nil :foreground "white" :background "black")))) + '(tooltip ((((class color)) (:inherit (variable-pitch) :foreground "black" :background "lightyellow")) (t (:inherit (variable-pitch))))) + '(mode-line ((((class color) (min-colors 88)) (:foreground "black" :background "grey75" :box (:line-width (1 . -1) :color nil :style released-button))) (t (:inverse-video t)))) + '(mode-line-buffer-id ((t (:weight bold)))) + '(mode-line-emphasis ((t (:weight bold)))) + '(mode-line-highlight ((((supports :box t) (class color) (min-colors 88)) (:box (:line-width (2 . 2) :color "grey40" :style released-button))) (t (:inherit (highlight))))) + '(mode-line-inactive ((default (:inherit (mode-line))) (((class color) (min-colors 88) (background light)) (:background "grey90" :foreground "grey20" :box (:line-width (1 . -1) :color "grey75" :style nil) :weight light)) (((class color) (min-colors 88) (background dark)) (:background "grey30" :foreground "grey80" :box (:line-width (1 . -1) :color "grey40" :style nil) :weight light)))) + '(isearch ((((class color) (min-colors 88) (background light)) (:foreground "lightskyblue1" :background "magenta3")) (((class color) (min-colors 88) (background dark)) (:foreground "brown4" :background "palevioletred2")) (((class color) (min-colors 16)) (:foreground "cyan1" :background "magenta4")) (((class color) (min-colors 8)) (:foreground "cyan1" :background "magenta4")) (t (:inverse-video t)))) + '(isearch-fail ((((class color) (min-colors 88) (background light)) (:background "RosyBrown1")) (((class color) (min-colors 88) (background dark)) (:background "red4")) (((class color) (min-colors 16)) (:background "red")) (((class color) (min-colors 8)) (:background "red")) (((class color grayscale)) (:foreground "grey")) (t (:inverse-video t)))) + '(lazy-highlight ((((class color) (min-colors 88) (background light)) (:background "paleturquoise")) (((class color) (min-colors 88) (background dark)) (:background "paleturquoise4")) (((class color) (min-colors 16)) (:background "turquoise3")) (((class color) (min-colors 8)) (:background "turquoise3")) (t (:underline (:color foreground-color :style line))))) + '(match ((((class color) (min-colors 88) (background light)) (:background "khaki1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray")))) + '(next-error ((t (:inherit (region))))) + '(query-replace ((t (:inherit (isearch))))) + '(default ((t (:inherit nil :extend nil :stipple nil :background "#15132f" :foreground "#f6f1d5" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 97 :width normal :foundry "Misc" :family "Termsyn"))))) + +(provide-theme 'eonn)