diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2018-10-14 15:20:46 -0500 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2019-01-11 19:39:55 -0600 |
commit | 1d2596c4e1fae0bd1bfe93664697b4933e7c7c26 (patch) | |
tree | 807515c694a1ab10ce88a980dd33fefd9178bfbd /emacs | |
parent | 4562825b5fcee68dcf939fc8d85fa5ac1f1336e1 (diff) |
emacs: add initial emacs configuration
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs | 32 | ||||
-rw-r--r-- | emacs/.emacs.d/colors.el | 2 | ||||
-rw-r--r-- | emacs/.emacs.d/org-mode.el | 60 | ||||
-rw-r--r-- | emacs/.emacs.d/treemacs.el | 3 |
4 files changed, 97 insertions, 0 deletions
diff --git a/emacs/.emacs b/emacs/.emacs new file mode 100644 index 0000000..a20e51b --- /dev/null +++ b/emacs/.emacs @@ -0,0 +1,32 @@ +(defconst user-init-dir + (cond ((boundp 'user-emacs-directory) user-emacs-directory) + ((boundp 'user-init-directory) user-init-directory) + (t "~/.emacs.d"))) + +(defun load-user-file (file) + "Load a file in current user's configuration directory" + (load (expand-file-name file user-init-dir) t nil t)) + +; These lines must come first, before `(package-initialize)` +(require 'package) +(add-to-list 'package-archives (cons "melpa" "https://melpa.org/packages/") t) + +(package-initialize) + +(load-user-file "org-mode.el") +(load-user-file "treemacs.el") +(load-user-file "colors.el") + +(custom-set-variables + '(package-selected-packages + (quote + (treemacs + ample-theme + color-theme-sanityinc-tomorrow + material-theme + subatomic-theme + subatomic256-theme + )))) + +(custom-set-faces + '(default ((t (:family "Inconsolata" :foundry "PfEd" :slant normal :weight normal :height 140 :width normal))))) diff --git a/emacs/.emacs.d/colors.el b/emacs/.emacs.d/colors.el new file mode 100644 index 0000000..ec84b20 --- /dev/null +++ b/emacs/.emacs.d/colors.el @@ -0,0 +1,2 @@ +;(load-theme 'sanityinc-tomorrow-blue t) +(load-theme 'material t) diff --git a/emacs/.emacs.d/org-mode.el b/emacs/.emacs.d/org-mode.el new file mode 100644 index 0000000..e80401c --- /dev/null +++ b/emacs/.emacs.d/org-mode.el @@ -0,0 +1,60 @@ +(require 'org-install) + +(load-user-file "org-mode.local.el") + +(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) +(add-to-list 'auto-mode-alist `(,(expand-file-name "~/org/") . org-mode)) + +(define-key mode-specific-map [?a] 'org-agenda) + +(eval-after-load "org" + '(progn + (define-prefix-command 'org-todo-state-map) + + (define-key org-mode-map "\C-cx" 'org-todo-state-map) + + (define-key org-todo-state-map "x" #'(lambda nil (interactive) (org-todo "CANCELLED"))) + (define-key org-todo-state-map "d" #'(lambda nil (interactive) (org-todo "DONE"))) + (define-key org-todo-state-map "f" #'(lambda nil (interactive) (org-todo "DEFERRED"))) + (define-key org-todo-state-map "l" #'(lambda nil (interactive) (org-todo "DELEGATED"))) + (define-key org-todo-state-map "s" #'(lambda nil (interactive) (org-todo "STARTED"))) + (define-key org-todo-state-map "w" #'(lambda nil (interactive) (org-todo "WAITING"))))) + +(define-key global-map "\C-cc" 'org-capture) + +(custom-set-variables + '(org-agenda-custom-commands + (quote + (("d" todo "DELEGATED" nil) + ("c" todo "DONE|DEFERRED|CANCELLED" nil) + ("w" todo "WAITING" nil) + ("W" agenda "" ((org-agenda-ndays 21))) + ("A" agenda "" + ((org-agenda-skip-function + (lambda nil + (org-agenda-skip-entry-if + (quote notregexp) + "\\=.*\\[#!\\]"))) + (org-agenda-ndays 1) + (org-agenda-overriding-header "Today's Priority #A tasks: "))) + ("u" alltodo "" + ((org-agenda-skip-function + (lambda nil + (org-agenda-skip-entry-if + (quote scheduled) + (quote deadline) + (quote regexp) + " +]+>"))) + (org-agenda-overriding-header "Unscheduled TODO entries: ")))))) + '(org-agenda-dim-blocked-tasks t) + '(org-agenda-ndays 7) + '(org-agenda-show-all-dates t) + '(org-agenda-skip-deadline-if-done t) + '(org-agenda-skip-scheduled-if-done t) + '(org-agenda-start-on-weekday nil) + '(org-deadline-warning-days 7) + '(org-enforce-todo-dependencies t) + '(org-fast-tag-selection-single-key (quote expert)) + '(org-return-follows-link t) + '(org-reverse-note-order t)) diff --git a/emacs/.emacs.d/treemacs.el b/emacs/.emacs.d/treemacs.el new file mode 100644 index 0000000..5117b71 --- /dev/null +++ b/emacs/.emacs.d/treemacs.el @@ -0,0 +1,3 @@ +(global-set-key (kbd "M-0") 'treemacs-select-window) +(global-set-key (kbd "C-x t t") 'treemacs) + |