dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit 562cfbc88f1e6154e025a8ffa582d83011462779
parent ef96ff7153c8bd738668a736a3890823616652d0
Author: rsiddharth <s@ricketyspace.net>
Date:   Sun,  5 May 2019 10:49:56 -0400

.emacs.d: Update init.el.

* .emacs.d/init.el: Move all configuration to this file.
* .emacs.d/elisp/rsd-config.el: Remove file.
* .emacs.d/elisp/rsd-disable.el: Remove file.
* .emacs.d/elisp/rsd-enable.el: Remove file.
* .emacs.d/elisp/rsd-gpg.el: Remove file.
* .emacs.d/elisp/rsd-pkgs.el: Remove file.
* .emacs.d/elisp/rsd-startup.el: Remove file.
* .emacs.d/elisp/rsd-text.el: Remove file.

Diffstat:
.emacs.d/elisp/rsd-config.el | 20--------------------
.emacs.d/elisp/rsd-disable.el | 12------------
.emacs.d/elisp/rsd-enable.el | 21---------------------
.emacs.d/elisp/rsd-gpg.el | 19-------------------
.emacs.d/elisp/rsd-pkgs.el | 129-------------------------------------------------------------------------------
.emacs.d/elisp/rsd-startup.el | 10----------
.emacs.d/elisp/rsd-text.el | 24------------------------
.emacs.d/init.el | 207+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
8 files changed, 204 insertions(+), 238 deletions(-)

diff --git a/.emacs.d/elisp/rsd-config.el b/.emacs.d/elisp/rsd-config.el @@ -1,20 +0,0 @@ -;; rsd-config.el -- loads all of rsd's customizations. -;; -;; License: CC0-1.0 - -(require 'rsd-startup) -(require 'rsd-disable) -(require 'rsd-enable) -(require 'rsd-text) -(require 'rsd-pkgs) -(require 'rsd-gpg) - -(progn - ;; custom - (setq custom-file "~/.emacs.d/elisp/custom.el") - (load custom-file) - - ;; set gpg environment variables. - (rsd/gpg-refresh-environment)) - -(provide 'rsd-config) diff --git a/.emacs.d/elisp/rsd-disable.el b/.emacs.d/elisp/rsd-disable.el @@ -1,12 +0,0 @@ -;; rsd-disable.el -- disable/fix things. -;; -;; License: CC0-1.0 - -;; disable -(dolist (mode '(tool-bar-mode - scroll-bar-mode - blink-cursor-mode - menu-bar-mode)) - (when (fboundp mode) (funcall mode -1))) - -(provide 'rsd-disable) diff --git a/.emacs.d/elisp/rsd-enable.el b/.emacs.d/elisp/rsd-enable.el @@ -1,21 +0,0 @@ -;; rsd-enable.el -- enable things. -;; -;; License: CC0-1.0 - -;; enable stuff. -(progn - (dolist (mode '(column-number-mode)) - (when (fboundp mode) (funcall mode 1))) - - ;; enable disabled commands - (put 'narrow-to-region 'disabled nil) - - ;; enable time stamping before save. - (add-hook 'before-save-hook 'time-stamp) - - ;; enable ido mode - (require 'ido) - (ido-mode t) - (setq ido-enable-flex-matching t)) - -(provide 'rsd-enable) diff --git a/.emacs.d/elisp/rsd-gpg.el b/.emacs.d/elisp/rsd-gpg.el @@ -1,19 +0,0 @@ -;; rsd-gpg.el -- setup gpg agent environment variables. -;; -;; License: CC0-1.0 - -(require 'subr-x) - -(defun rsd/gpg-refresh-environment () - "Set gpg-agent environment variables." - (interactive) - (let ((gset (lambda (p) - (setenv (car p) - (string-trim - (shell-command-to-string - (concat "gpgconf --list-dirs " (cdr p))))))) - (env-vars '(("SSH_AUTH_SOCK" . "agent-ssh-socket") - ("GPG_AGENT_INFO" . "agent-socket")))) - (if (executable-find "gpgconf") (mapc gset env-vars)))) - -(provide 'rsd-gpg) diff --git a/.emacs.d/elisp/rsd-pkgs.el b/.emacs.d/elisp/rsd-pkgs.el @@ -1,129 +0,0 @@ -;; rsd-pkgs.el -- install/customize packages. -;; -;; License: CC0-1.0 - -;; melpa -(require 'package) -(add-to-list 'package-archives - '("melpa" . "http://melpa.org/packages/")) - -;; use-package -(unless (package-installed-p 'use-package) - (package-refresh-contents) - (package-install 'use-package)) - -;; server -(use-package server - :config - (unless (server-running-p) - (server-start))) - -;; org -(use-package org - :mode ("\\.org\\'" . org-mode) - :config - (setq org-directory "~/v/lyra.ricketyspace.net/org") - (setq org-agenda-files (concat org-directory "/agenda.org")) - (setq org-default-notes-file (concat org-directory "/scratch.org")) - (setq org-archive-location (concat org-directory "/archive.org::* %s")) - (setq org-capture-templates - '(("r" "rtask" entry - (file+headline "~/v/lyra.ricketyspace.net/org/todo.org" "rtasks") - "* TODO %?\n DEADLINE: %^T") - ("o" "otask" entry - (file+headline "~/v/lyra.ricketyspace.net/org/todo.org" "otasks") - "* TODO %?\n DEADLINE: %^T") - ("c" "calendar" entry - (file+headline "~/v/lyra.ricketyspace.net/org/todo.org" "calendar") - "* %?\n %^T"))) - (setq org-log-done 'time) - :bind (("C-c l" . org-store-link) - ("C-c a" . org-agenda) - ("C-c b" . org-iswitchb) - ("C-c c" . org-capture))) - -;; bookmarks -(use-package bookmark - :config - (setq bookmark-default-file "~/.emacs.d/elisp/bookmarks.el") - (setq bookmark-save-flag 1)) - -;; markdown -(use-package markdown-mode :ensure t) - -;; web-mode -(use-package web-mode - :ensure t - :mode ("\\.tpl\\|\\.php\\'" "\\.html?\\'" "\\.js\\|.css'") - :config - (setq web-mode-enable-auto-indentation nil) - (defun rsd/web-mode/enable-tabs () - "Enable tabs on indent. Fuck it." - (interactive) - (setq-local indent-tabs-mode t) - (web-mode-use-tabs))) - -;; magit -(use-package magit - :ensure t - :bind (("C-x g" . magit-status) - ("C-x M-g" . magit-dispatch-popup))) - -;; guix -(use-package guix :ensure t) - -;; geiser -(use-package geiser :ensure t) - -;; geiser-guile -(use-package geiser-guile - :init - (setq-default guile-load-paths '("~/v/git.ricketyspace.net/sicp" - "~/v/git.ricketyspace.net/taocp/guile" - "~/v/git.ricketyspace.net/git-difme")) - :config - (setq geiser-active-implementations '(guile)) - (setq geiser-mode-smart-tab-p t) - (setq geiser-guile-binary "guile2.2") - (mapc (lambda (path) (add-to-list 'geiser-guile-load-path path)) - guile-load-paths)) - -;; paredit -(use-package paredit - :ensure t - :init - (setq-default rsd/paredit-modes '(emacs-lisp-mode-hook - lisp-mode-hook - lisp-interaction-mode-hook - scheme-mode-hook - racket-mode-hook)) - :config - (mapc (lambda (mode) (add-hook mode 'enable-paredit-mode)) rsd/paredit-modes)) - -;; haskell-mode -(use-package haskell-mode :ensure t) - -;; haskell-tab-indent-mode -(use-package haskell-tab-indent - :ensure t - :config - ;; If a project uses tabs instead of spaces, use indentation minor - ;; mode provided by this package. - (add-hook 'haskell-mode-hook - (lambda () - (add-hook 'hack-local-variables-hook - (lambda () - (if indent-tabs-mode - (haskell-tab-indent-mode) - (haskell-indentation-mode))) - nil t)))) - -;; racket mode -(use-package racket-mode - :ensure t - :mode ("\\.rkt")) - -;; ledger -(use-package ledger-mode :ensure t) - -(provide 'rsd-pkgs) diff --git a/.emacs.d/elisp/rsd-startup.el b/.emacs.d/elisp/rsd-startup.el @@ -1,10 +0,0 @@ -;; rsd-startup.el -- customize emacs startup. -;; -;; License: CC0-1.0 - -(progn - (setq inhibit-startup-screen t) - (setq initial-buffer-choice "~/v/lyra.ricketyspace.net/org/scratch.org") - (setq initial-scratch-message nil)) - -(provide 'rsd-startup) diff --git a/.emacs.d/elisp/rsd-text.el b/.emacs.d/elisp/rsd-text.el @@ -1,24 +0,0 @@ -;; rsd-text.el -- utf-8, spacing, font, etc. -;; -;; License: CC0-1.0 - -(progn - ;; tabs and spacing - (setq tab-width 4) - (setq-default indent-tabs-mode nil) - - ;; utf-8 - (prefer-coding-system 'utf-8) - (set-default-coding-systems 'utf-8) - (set-terminal-coding-system 'utf-8) - (set-keyboard-coding-system 'utf-8) - - (set-language-environment "UTF-8") - - ;; font - (add-to-list 'default-frame-alist '(font . "terminus 10")) - - ;; switch off syntax higlighting. - (global-font-lock-mode 0)) - -(provide 'rsd-text) diff --git a/.emacs.d/init.el b/.emacs.d/init.el @@ -1,8 +1,209 @@ -;; .emacs +;; init.el ;; ;; License: CC0-1.0 +;;; pkgs (package-initialize) -(add-to-list 'load-path (expand-file-name "~/.emacs.d/elisp")) -(require 'rsd-config) +;; melpa +(require 'package) +(add-to-list 'package-archives + '("melpa" . "http://melpa.org/packages/")) + +;; use-package +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) + +;; server +(use-package server + :config + (unless (server-running-p) + (server-start))) + +;; org +(use-package org + :mode ("\\.org\\'" . org-mode) + :config + (setq org-directory "~/v/lyra.ricketyspace.net/org") + (setq org-agenda-files (concat org-directory "/agenda.org")) + (setq org-default-notes-file (concat org-directory "/scratch.org")) + (setq org-archive-location (concat org-directory "/archive.org::* %s")) + (setq org-capture-templates + '(("r" "rtask" entry + (file+headline "~/v/lyra.ricketyspace.net/org/todo.org" "rtasks") + "* TODO %?\n DEADLINE: %^T") + ("o" "otask" entry + (file+headline "~/v/lyra.ricketyspace.net/org/todo.org" "otasks") + "* TODO %?\n DEADLINE: %^T") + ("c" "calendar" entry + (file+headline "~/v/lyra.ricketyspace.net/org/todo.org" "calendar") + "* %?\n %^T"))) + (setq org-log-done 'time) + :bind (("C-c l" . org-store-link) + ("C-c a" . org-agenda) + ("C-c b" . org-iswitchb) + ("C-c c" . org-capture))) + +;; bookmarks +(use-package bookmark + :config + (setq bookmark-default-file "~/.emacs.d/elisp/bookmarks.el") + (setq bookmark-save-flag 1)) + +;; markdown +(use-package markdown-mode :ensure t) + +;; web-mode +(use-package web-mode + :ensure t + :mode ("\\.tpl\\|\\.php\\'" "\\.html?\\'" "\\.js\\|.css'") + :config + (setq web-mode-enable-auto-indentation nil) + (defun rsd/web-mode/enable-tabs () + "Enable tabs on indent. Fuck it." + (interactive) + (setq-local indent-tabs-mode t) + (web-mode-use-tabs))) + +;; magit +(use-package magit + :ensure t + :bind (("C-x g" . magit-status) + ("C-x M-g" . magit-dispatch-popup))) + +;; guix +(use-package guix :ensure t) + +;; geiser +(use-package geiser :ensure t) + +;; geiser-guile +(use-package geiser-guile + :init + (setq-default guile-load-paths '("~/v/git.ricketyspace.net/sicp" + "~/v/git.ricketyspace.net/taocp/guile" + "~/v/git.ricketyspace.net/git-difme")) + :config + (setq geiser-active-implementations '(guile)) + (setq geiser-mode-smart-tab-p t) + (setq geiser-guile-binary "guile2.2") + (mapc (lambda (path) (add-to-list 'geiser-guile-load-path path)) + guile-load-paths)) + +;; paredit +(use-package paredit + :ensure t + :init + (setq-default rsd/paredit-modes '(emacs-lisp-mode-hook + lisp-mode-hook + lisp-interaction-mode-hook + scheme-mode-hook + racket-mode-hook)) + :config + (mapc (lambda (mode) (add-hook mode 'enable-paredit-mode)) rsd/paredit-modes)) + +;; haskell-mode +(use-package haskell-mode :ensure t) + +;; haskell-tab-indent-mode +(use-package haskell-tab-indent + :ensure t + :config + ;; If a project uses tabs instead of spaces, use indentation minor + ;; mode provided by this package. + (add-hook 'haskell-mode-hook + (lambda () + (add-hook 'hack-local-variables-hook + (lambda () + (if indent-tabs-mode + (haskell-tab-indent-mode) + (haskell-indentation-mode))) + nil t)))) + +;; racket mode +(use-package racket-mode + :ensure t + :mode ("\\.rkt")) + +;; ledger +(use-package ledger-mode :ensure t) + + +;;; gpg +(require 'subr-x) + +(defun rsd/gpg-refresh-environment () + "Set gpg-agent environment variables." + (interactive) + (let ((gset (lambda (p) + (setenv (car p) + (string-trim + (shell-command-to-string + (concat "gpgconf --list-dirs " (cdr p))))))) + (env-vars '(("SSH_AUTH_SOCK" . "agent-ssh-socket") + ("GPG_AGENT_INFO" . "agent-socket")))) + (if (executable-find "gpgconf") (mapc gset env-vars)))) + + +;;; startup +(progn + (setq inhibit-startup-screen t) + (setq initial-buffer-choice "~/v/lyra.ricketyspace.net/org/scratch.org") + (setq initial-scratch-message nil)) + + +;;; disable +(dolist (mode '(tool-bar-mode + scroll-bar-mode + blink-cursor-mode + menu-bar-mode)) + (when (fboundp mode) (funcall mode -1))) + + +;;; enable +(progn + (dolist (mode '(column-number-mode)) + (when (fboundp mode) (funcall mode 1))) + + ;; enable disabled commands + (put 'narrow-to-region 'disabled nil) + + ;; enable time stamping before save. + (add-hook 'before-save-hook 'time-stamp) + + ;; enable ido mode + (require 'ido) + (ido-mode t) + (setq ido-enable-flex-matching t)) + + +;;; text +(progn + ;; tabs and spacing + (setq tab-width 4) + (setq-default indent-tabs-mode nil) + + ;; utf-8 + (prefer-coding-system 'utf-8) + (set-default-coding-systems 'utf-8) + (set-terminal-coding-system 'utf-8) + (set-keyboard-coding-system 'utf-8) + + (set-language-environment "UTF-8") + + ;; font + (add-to-list 'default-frame-alist '(font . "terminus 10")) + + ;; switch off syntax higlighting. + (global-font-lock-mode 0)) + + +;;; config +(progn + ;; custom + (setq custom-file "~/.emacs.d/elisp/custom.el") + (load custom-file) + + ;; set gpg environment variables. + (rsd/gpg-refresh-environment))