summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2024-06-12 23:17:41 -0700
committerChristian Cunningham <cc@localhost>2024-06-12 23:17:41 -0700
commitb0c87544fe0c8b103354904370445757e05b9bab (patch)
treef92092e6a684501ba115631cecd87054e8c29d4a
parentdafe93397ae082eff584fd27762fbc0556067af6 (diff)
Restructuring
- Break functions out to their own files - Move user settings to its own file - Move dashboard to its own file - Remove old splash - Don't hardcode executables
-rw-r--r--elchemy-boilerplate.el4
-rw-r--r--elchemy-dashboard.el63
-rw-r--r--elchemy-functions.el53
-rw-r--r--elchemy-keys.el1
-rw-r--r--elchemy-package-org.el32
-rw-r--r--elchemy-package-yasnippet.el2
-rw-r--r--elchemy-personal.el181
-rw-r--r--elchemy-splash.el11
-rw-r--r--elchemy-user.el98
-rw-r--r--elchemy.el12
10 files changed, 228 insertions, 229 deletions
diff --git a/elchemy-boilerplate.el b/elchemy-boilerplate.el
index 16cbe00..9cd156c 100644
--- a/elchemy-boilerplate.el
+++ b/elchemy-boilerplate.el
@@ -1,5 +1,5 @@
(setq gc-cons-threshold 402653184
- gc-cons-percentage 0.6)
+ gc-cons-percentage 0.6)
(defvar startup/file-name-handler-alist file-name-handler-alist)
(setq file-name-handler-alist nil)
@@ -9,7 +9,7 @@
(defun startup/reset-gc ()
(setq gc-cons-threshold 16777216
- gc-cons-percentage 0.1))
+ gc-cons-percentage 0.1))
(add-hook 'emacs-startup-hook 'startup/revert-file-name-handler-alist)
(add-hook 'emacs-startup-hook 'startup/reset-gc)
diff --git a/elchemy-dashboard.el b/elchemy-dashboard.el
new file mode 100644
index 0000000..5116807
--- /dev/null
+++ b/elchemy-dashboard.el
@@ -0,0 +1,63 @@
+(defun elchemy/create-dashboard ()
+ "Create the user dashboard"
+ (interactive)
+ (let ((buffer (get-buffer-create "*Dashboard*")))
+ (switch-to-buffer buffer)
+ (unless buffer-read-only
+ (when (file-exists-p (concat elchemy/elchemy-root elchemy/dashboard-splash))
+ (insert-image (create-image (concat elchemy/elchemy-root elchemy/dashboard-splash) nil nil :scale 0.25))
+ (insert "\n"))
+ (let ((start (point)))
+ (insert "Elchemy Dashboard")
+ (add-text-properties start (point)
+ '(face (:height 4.0))))
+ (insert "\n\n")
+ (dotimes (i (length elchemy/dashboard/heading-buttons))
+ (let* ((button (nth i elchemy/dashboard/heading-buttons))
+ (title (car button))
+ (callback (cdr button)))
+ (insert (buttonize title callback))
+ (if (eq (% (+ i 1) elchemy/dashboard/heading-columns) 0)
+ (insert "\n")
+ (insert (format (concat "%-" (format "%d" (+ (- elchemy/dashboard/heading-max-length (length title)) elchemy/dashboard/heading-padding)) "s") " ")))))
+ (unless (eq (% (length elchemy/dashboard/heading-buttons) elchemy/dashboard/heading-columns) 0)
+ (insert "\n"))
+ (insert "\n\n")
+ (when (file-exists-p (concat elchemy/elchemy-root elchemy/elchemy-projects-file))
+ (let ((start (point)))
+ (insert "Projects")
+ (add-text-properties start (point)
+ '(face (:height 1.5))))
+ (insert "\n")
+ (mapcar #'(lambda (x) (let ((name (car x))
+ (path (cdr x)))
+ (insert (buttonize name (lambda (y) (elchemy/find-file y)) path) "\n")))
+ (elchemy/read-alist-file (concat elchemy/elchemy-root elchemy/elchemy-projects-file)))
+ (insert "\n"))
+ (let ((start (point)))
+ (insert "Command Reference")
+ (add-text-properties start (point)
+ '(face (:height 1.5))))
+ (insert "\n")
+ (insert "C-/ ~ Undo\n")
+ (insert "C-x n n ~ Narrow\n")
+ (insert "C-x n w ~ Widen\n")
+ (insert "M-% ~ Query Replace\n")
+ (insert "C-M-s ~ Regex Search\n")
+ (insert "F3 ~ Record Macro\n")
+ (insert "F4 ~ Play Macro\n")
+ (insert "M-0 F4 ~ Play Macro until failure\n")
+ (insert "M-l ~ Lowercase following word\n")
+ (insert "M-u ~ Uppercase following word\n")
+ (insert "M-c ~ Capitalize following word\n")
+ (insert "M-g w ~ Jump to word\n")
+ (insert "M-g l ~ Jump to line\n")
+ (insert "C-x C-l ~ Lowercase Region\n")
+ (insert "C-x C-u ~ Uppercase Region\n")
+ (insert "C-M-n ~ Move forward one balanced expression\n")
+ (insert "C-M-p ~ Move forward one balanced expression\n")
+ (setq header-line-format nil)
+ (button-mode +1)
+ (read-only-mode +1))))
+
+(provide 'elchemy-dashboard)
diff --git a/elchemy-functions.el b/elchemy-functions.el
index 465034b..a5919d7 100644
--- a/elchemy-functions.el
+++ b/elchemy-functions.el
@@ -1,10 +1,59 @@
(defun elchemy/replace-in-buffer ()
+ "Replace strings in buffer"
(interactive)
(save-excursion
(if (equal mark-active nil) (mark-word))
(setq elchemy/rib/current-word (buffer-substring-no-properties (mark) (point)))
- (setq elchemy/rib/old-string (read-string "OLD string:\n" elchemy/rib/current-word))
- (setq elchemy/rib/new-string (read-string "NEW string:\n" elchemy/rib/old-string))
+ (setq elchemy/rib/old-string (read-string "OLD string: " elchemy/rib/current-word))
+ (setq elchemy/rib/new-string (read-string "NEW string: " elchemy/rib/old-string))
(query-replace elchemy/rib/old-string elchemy/rib/new-string nil (point-min) (point-max))))
+(defun elchemy/add-to-pypath (&optional path)
+ "* Add to python path"
+ (interactive)
+ (let* ((fullpath (if path
+ path
+ (ido-read-directory-name "Path: "))))
+ (setenv "PYTHONPATH"
+ (let ((current (getenv "PYTHONPATH"))
+ (new fullpath))
+ (if current
+ (concat new ":" current)
+ new)))))
+
+(defun elchemy/personal/ignore-angle-brackets ()
+ "Ignore angle brackets in org mode"
+ (modify-syntax-entry ?< ".")
+ (modify-syntax-entry ?> "."))
+
+(defun elchemy/read-alist-file (file-path)
+ "Read a file where each line is an alist of the form (name . location), returning a list of these pairs."
+ (interactive "fEnter file path: ")
+ (let (result)
+ (with-temp-buffer
+ (insert-file-contents file-path)
+ (goto-char (point-min))
+ (while (not (eobp))
+ (let ((line (buffer-substring-no-properties (line-beginning-position) (line-end-position))))
+ (when (not (string-blank-p line))
+ (let ((pair (car (read-from-string line))))
+ (push pair result))))
+ (forward-line 1)))
+ (reverse result)))
+
+(defun elchemy/find-file (FILENAME)
+ "Find File to new split"
+ (let ((buffer (find-file-noselect FILENAME)))
+ (when (one-window-p)
+ (split-window-right))
+ (other-window 1)
+ (switch-to-buffer buffer)))
+
+(defun elchemy/term (TERM)
+ "Terminal to new split"
+ (when (one-window-p)
+ (split-window-right))
+ (other-window 1)
+ (term TERM))
+
(provide 'elchemy-functions)
diff --git a/elchemy-keys.el b/elchemy-keys.el
index 2ab1370..d0b7e68 100644
--- a/elchemy-keys.el
+++ b/elchemy-keys.el
@@ -1,4 +1,3 @@
-;(global-set-key (kbd "C-x w") 'ace-select-window)
(global-set-key (kbd "C-z") 'elchemy/replace-in-buffer)
(provide 'elchemy-keys)
diff --git a/elchemy-package-org.el b/elchemy-package-org.el
index cdd0e3b..1aa5941 100644
--- a/elchemy-package-org.el
+++ b/elchemy-package-org.el
@@ -6,38 +6,6 @@
(custom-declare-face '+org-todo-cancel '((t (:inherit (bold error org-todo)))) "")
(unless (file-exists-p elchemy/user/org-directory)
(make-directory elchemy/user/org-directory))
- (setq org-directory elchemy/user/org-directory
- org-agenda-files (list (concat elchemy/user/org-directory elchemy/user/org-todo-file-name))
- org-todo-keywords
- '((sequence "TODO(t)"
- "STRT(s)"
- "WAIT(w)"
- "|"
- "DONE(d)"
- "KILL(k)")
- (sequence "[ ](T)"
- "[-](S)"
- "[?](W)"
- "|"
- "[X](D)")
- (sequence "|"
- "OKAY(o)"
- "YES(y)"
- "NO(n)"))
- org-capture-templates
- `(("n" "Notes" entry (file+olp+datetree ,(concat elchemy/user/org-directory elchemy/user/org-notes-file-name) "Notes")
- "* %?\nEntered on %U\n %i\n %a")
- ("t" "Todo" entry (file+headline ,(concat elchemy/user/org-directory elchemy/user/org-todo-file-name) "Tasks")
- "* TODO %?\n %i\n %a"))
- org-todo-keyword-faces
- '(("[-]" . +org-todo-active)
- ("STRT" . +org-todo-active)
- ("[?]" . +org-todo-onhold)
- ("WAIT" . +org-todo-onhold)
- ("HOLD" . +org-todo-onhold)
- ("PROJ" . +org-todo-project)
- ("NO" . +org-todo-cancel)
- ("KILL" . +org-todo-cancel)))
:config
(global-set-key (kbd "C-c l") 'org-store-link)
(global-set-key (kbd "C-c a") 'org-agenda)
diff --git a/elchemy-package-yasnippet.el b/elchemy-package-yasnippet.el
index 831a1bf..bec0bd2 100644
--- a/elchemy-package-yasnippet.el
+++ b/elchemy-package-yasnippet.el
@@ -3,6 +3,6 @@
:init
(add-hook 'python-ts-mode-hook #'yas-minor-mode)
:config
- (setq yas-snippet-dirs '("~/.elchemy/snippets/")))
+ (setq yas-snippet-dirs `(,(concat elchemy/elchemy-root "snippets/"))))
(provide 'elchemy-package-yasnippet)
diff --git a/elchemy-personal.el b/elchemy-personal.el
index ac99314..dbb3423 100644
--- a/elchemy-personal.el
+++ b/elchemy-personal.el
@@ -1,21 +1,15 @@
-;; Ignore bell
-(setq ring-bell-function 'ignore)
+(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.8))
+(let ((png (cdr (assoc 'dvipng org-preview-latex-process-alist))))
+ (plist-put png :latex-compiler '("latex -interaction nonstopmode -output-directory %o %F"))
+ (plist-put png :image-converter '("dvipng -D %D -T tight -o %O %F"))
+ (plist-put png :transparent-image-converter '("dvipng -D %D -T tight -bg Transparent -o %O %F")))
-(setq python-shell-interpreter "~/.micromamba/envs/emacs-py/bin/ipython"
- python-shell-interpreter-args "--pylab")
+(when (executable-find "guile")
+ (add-to-list 'load-path (concat elchemy/elchemy-root "extras/"))
+ (require 'guile-interaction))
-(defun elchemy/add-to-pypath (&optional path)
- "# Add to python path"
- (interactive)
- (let* ((fullpath (if path
- path
- (ido-read-directory-name "Path: "))))
- (setenv "PYTHONPATH"
- (let ((current (getenv "PYTHONPATH"))
- (new fullpath))
- (if current
- (concat new ":" current)
- new)))))
+(put 'narrow-to-region 'disabled nil)
+(put 'downcase-region 'disabled nil)
(add-to-list 'major-mode-remap-alist '(python-mode . python-ts-mode))
@@ -24,26 +18,6 @@
(define-key eglot-mode-map (kbd "C-c l f") 'eglot-format)
(define-key eglot-mode-map (kbd "C-c l d") 'eldoc)
-(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.8))
-(let ((png (cdr (assoc 'dvipng org-preview-latex-process-alist))))
- (plist-put png :latex-compiler '("latex -interaction nonstopmode -output-directory %o %F"))
- (plist-put png :image-converter '("dvipng -D %D -T tight -o %O %F"))
- (plist-put png :transparent-image-converter '("dvipng -D %D -T tight -bg Transparent -o %O %F")))
-
-(org-babel-do-load-languages
- 'org-babel-load-languages
- '((python . t)
- (gnuplot . t)
- (R . t)))
-(setq org-babel-python-command python-shell-interpreter)
-(setq org-babel-R-command "/usr/local/bin/R --slave --no-save")
-(setq org-babel-gnuplot-command "/usr/local/bin/gnuplot")
-(setq org-confirm-babel-evaluate nil)
-
-(defun elchemy/personal/ignore-angle-brackets ()
- "Ignore angle brackets in org mode"
- (modify-syntax-entry ?< ".")
- (modify-syntax-entry ?> "."))
(add-hook 'org-mode-hook 'elchemy/personal/ignore-angle-brackets)
(add-to-list 'load-path "~/.emacs.d/extras/")
@@ -60,145 +34,14 @@
(get-buffer-process (current-buffer))
nil "_"))))
-(setq sentence-end-double-space nil)
-
-(defun elchemy/read-alist-file (file-path)
- "Read a file where each line is an alist of the form (name . location), returning a list of these pairs."
- (interactive "fEnter file path: ")
- (let (result)
- (with-temp-buffer
- (insert-file-contents file-path)
- (goto-char (point-min))
- (while (not (eobp))
- (let ((line (buffer-substring-no-properties (line-beginning-position) (line-end-position))))
- (when (not (string-blank-p line))
- (let ((pair (car (read-from-string line))))
- (push pair result))))
- (forward-line 1)))
- (reverse result)))
-
-(defun elchemy/find-file (FILENAME)
- "Find File to new split"
- (let ((buffer (find-file-noselect FILENAME)))
- (when (one-window-p)
- (split-window-right))
- (other-window 1)
- (switch-to-buffer buffer)))
-(defun elchemy/term (TERM)
- "Terminal to new split"
- (when (one-window-p)
- (split-window-right))
- (other-window 1)
- (term TERM))
-
-(setq elchemy/dashboard/heading-columns 3
- elchemy/dashboard/heading-buttons '(
- ("Open Local TODO" . (lambda (x) (elchemy/find-file "~/org/todo.org")))
- ("Open Remote TODO" . (lambda (x) (elchemy/find-file "/ssh:onid:todo.org")))
- ("Open Local Notes" . (lambda (x) (elchemy/find-file "~/org/notes.org")))
- ("Open Remote Notes" . (lambda (x) (elchemy/find-file "/ssh:onid:knowledge.org")))
- ("Open Terminal" . (lambda (x) (elchemy/term "/bin/zsh")))
- ("Open Scratch" . (lambda (x)
- (when (one-window-p)
- (split-window-right))
- (other-window 1)
- (scratch-buffer)))
- ("Testing" . (lambda (x) (elchemy/find-file "/ssh:onid:test.el")))
- )
- elchemy/dashboard/heading-max-length (apply #'max (mapcar #'(lambda (x) (length (car x))) elchemy/dashboard/heading-buttons))
- elchemy/dashboard/heading-padding 4)
-
-(defun elchemy/create-dashboard ()
- "Create the user dashboard"
- (interactive)
- (let ((buffer (get-buffer-create "*Dashboard*")))
- (switch-to-buffer buffer)
- (unless buffer-read-only
- (when (file-exists-p "~/.elchemy/assets/splash.png")
- (insert-image (create-image "~/.elchemy/assets/splash.png" nil nil :scale 0.25))
- (insert "\n"))
- (let ((start (point)))
- (insert "Elchemy Dashboard")
- (add-text-properties start (point)
- '(face (:height 4.0))))
- (insert "\n\n")
- (dotimes (i (length elchemy/dashboard/heading-buttons))
- (let* ((button (nth i elchemy/dashboard/heading-buttons))
- (title (car button))
- (callback (cdr button)))
- (insert (buttonize title callback))
- (if (eq (% (+ i 1) elchemy/dashboard/heading-columns) 0)
- (insert "\n")
- (insert (format (concat "%-" (format "%d" (+ (- elchemy/dashboard/heading-max-length (length title)) elchemy/dashboard/heading-padding)) "s") " ")))))
- (unless (eq (% (length elchemy/dashboard/heading-buttons) elchemy/dashboard/heading-columns) 0)
- (insert "\n"))
- (insert "\n")
- (insert
- (buttonize "Open Personal Configuration" (lambda (x) (elchemy/find-file "~/.elchemy/elchemy-personal.el"))))
- (insert "\n\n")
- (when (file-exists-p "~/.elchemy/projects")
- (let ((start (point)))
- (insert "Projects")
- (add-text-properties start (point)
- '(face (:height 1.5))))
- (insert "\n")
- (mapcar #'(lambda (x) (let ((name (car x))
- (path (cdr x)))
- (insert (buttonize name (lambda (y) (elchemy/find-file y)) path) "\n")))
- (elchemy/read-alist-file "~/.elchemy/projects"))
- (insert "\n"))
- (let ((start (point)))
- (insert "Command Reference")
- (add-text-properties start (point)
- '(face (:height 1.5))))
- (insert "\n")
- (insert "C-/ ~ Undo\n")
- (insert "C-x n n ~ Narrow\n")
- (insert "C-x n w ~ Widen\n")
- (insert "M-% ~ Query Replace\n")
- (insert "C-M-s ~ Regex Search\n")
- (insert "F3 ~ Record Macro\n")
- (insert "F4 ~ Play Macro\n")
- (insert "M-0 F4 ~ Play Macro until failure\n")
- (insert "M-l ~ Lowercase following word\n")
- (insert "M-u ~ Uppercase following word\n")
- (insert "M-c ~ Capitalize following word\n")
- (insert "M-g w ~ Jump to word\n")
- (insert "M-g l ~ Jump to line\n")
- (insert "C-x C-l ~ Lowercase Region\n")
- (insert "C-x C-u ~ Uppercase Region\n")
- (insert "C-M-n ~ Move forward one balanced expression\n")
- (insert "C-M-p ~ Move forward one balanced expression\n")
- (setq header-line-format nil)
- (button-mode +1)
- (read-only-mode +1))))
-(elchemy/create-dashboard)
-
-(add-to-list 'org-agenda-files "/ssh:onid:todo.org")
-(add-to-list 'org-capture-templates '("o" "OSU Todo" entry (file+headline "/ssh:onid:todo.org" "Imported")
- "* TODO %?\n %i\n %a\n"))
-(add-to-list 'org-capture-templates '("k" "Knowledge Entry" entry (file+headline "/ssh:onid:knowledge.org" "Imported")
- "* %?\n %i\n %a\n"))
+(when (require 'elchemy-dashboard nil t)
+ (elchemy/create-dashboard))
(add-hook 'minibuffer-setup-hook
(lambda ()
(make-local-variable 'face-remapping-alist)
(add-to-list 'face-remapping-alist '(default (:background "gray90")))))
-(setq-default header-line-format '(
- (:propertize "♥︎" face (:foreground "red"))
- " "
- (:propertize "ELCHEMY" face (:weight bold))
- " "
- (:propertize "♦︎" face (:foreground "red"))
- " "
- (:propertize "%b" face (:slant italic))
- " ♣︎ "
- (:eval mode-name)
- " ♠︎"))
-
-(load "extras/guile-interaction.el")
-(require 'guile-interaction)
(provide 'elchemy-personal)
diff --git a/elchemy-splash.el b/elchemy-splash.el
deleted file mode 100644
index dbc8fd0..0000000
--- a/elchemy-splash.el
+++ /dev/null
@@ -1,11 +0,0 @@
-(switch-to-buffer "*splash*")
-(with-current-buffer "*splash*"
- (let* ((message "Welcome to nEmacs")
- (message-len (length message)))
- (insert
- (concat
- (make-string (/ (- (window-total-width) message-len) 2) ? )
- message
- "\n"))))
-
-(provide 'elchemy-splash)
diff --git a/elchemy-user.el b/elchemy-user.el
index a29a85c..6fca1a1 100644
--- a/elchemy-user.el
+++ b/elchemy-user.el
@@ -1,16 +1,108 @@
+;; User information
(setq user-full-name "Sergey Bilovytskyy"
user-mail-address "sergey@sbrl.xyz")
+;; Dashboard
+(setq elchemy/dashboard/heading-columns 3
+ elchemy/dashboard/heading-buttons '(("Open Local TODO" . (lambda (x) (elchemy/find-file "~/org/todo.org")))
+ ("Open Remote TODO" . (lambda (x) (elchemy/find-file "/ssh:onid:todo.org")))
+ ("Open Local Notes" . (lambda (x) (elchemy/find-file "~/org/notes.org")))
+ ("Open Remote Notes" . (lambda (x) (elchemy/find-file "/ssh:onid:knowledge.org")))
+ ("Open Terminal" . (lambda (x) (elchemy/term "/bin/zsh")))
+ ("Open Scratch" . (lambda (x)
+ (when (one-window-p)
+ (split-window-right))
+ (other-window 1)
+ (scratch-buffer)))
+ ("User Conf" . (lambda (x) (elchemy/find-file (concat elchemy/elchemy-root "elchemy-user.el"))))
+ ("Personal Conf" . (lambda (x) (elchemy/find-file (concat elchemy/elchemy-root "elchemy-personal.el"))))
+ ("Testing" . (lambda (x) (elchemy/find-file "/ssh:onid:test.el")))
+ )
+ elchemy/dashboard/heading-max-length (apply #'max (mapcar #'(lambda (x) (length (car x))) elchemy/dashboard/heading-buttons))
+ elchemy/dashboard/heading-padding 4)
+
+;; General Settings
(setq default-directory "~/"
default-input-method "ukrainian-computer"
- disable-lockfiles nil)
+ disable-lockfiles nil
+ sentence-end-double-space nil
+ inhibit-startup-screen t)
+;; User Options
(setq elchemy/user/latex-compiler "lualatex"
elchemy/user/org-directory "~/org/"
elchemy/user/org-todo-file-name "todo.org"
elchemy/user/org-notes-file-name "notes.org"
- elchemy/user/org-hideaway t)
+ elchemy/user/org-hideaway t
+ elchemy/elchemy-projects-file "projects"
+ elchemy/dashboard-splash "assets/splash.png")
+
+;; Modeline
+(setq-default mode-line-format '((:propertize "♥︎" face (:foreground "red"))
+ " "
+ (:propertize "ELCHEMY" face (:weight bold))
+ " "
+ (:propertize "♦︎" face (:foreground "red"))
+ " "
+ (:propertize "%b" face (:slant italic))
+ " ♣︎ "
+ (:eval mode-name)
+ " ♠︎"))
+
+;; Ignore Bell
+(setq ring-bell-function 'ignore)
+
+;; Python
+(setq python-shell-interpreter "~/.micromamba/envs/emacs-py/bin/ipython"
+ python-shell-interpreter-args "--pylab")
-(setq-default mode-line-format nil)
+;; Org Mode Options
+(org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((python . t)
+ (gnuplot . t)
+ (R . t)))
+(setq org-babel-python-command python-shell-interpreter
+ org-babel-R-command (concat (executable-find "R") " --slave --no-save")
+ org-babel-gnuplot-command (executable-find "gnuplot")
+ org-confirm-babel-evaluate nil)
+(setq org-directory elchemy/user/org-directory
+ org-agenda-files (list
+ (concat elchemy/user/org-directory elchemy/user/org-todo-file-name)
+ "/ssh:onid:todo.org")
+ org-todo-keywords
+ '((sequence "TODO(t)"
+ "STRT(s)"
+ "WAIT(w)"
+ "|"
+ "DONE(d)"
+ "KILL(k)")
+ (sequence "[ ](T)"
+ "[-](S)"
+ "[?](W)"
+ "|"
+ "[X](D)")
+ (sequence "|"
+ "OKAY(o)"
+ "YES(y)"
+ "NO(n)"))
+ org-capture-templates
+ `(("n" "Notes" entry (file+olp+datetree ,(concat elchemy/user/org-directory elchemy/user/org-notes-file-name) "Notes")
+ "* %?\nEntered on %U\n %i\n %a")
+ ("t" "Todo" entry (file+headline ,(concat elchemy/user/org-directory elchemy/user/org-todo-file-name) "Tasks")
+ "* TODO %?\n %i\n %a")
+ ("o" "OSU Todo" entry (file+headline "/ssh:onid:todo.org" "Imported")
+ "* TODO %?\n %i\n %a\n")
+ ("k" "Knowledge Entry" entry (file+headline "/ssh:onid:knowledge.org" "Imported")
+ "* %?\n %i\n %a\n"))
+ org-todo-keyword-faces
+ '(("[-]" . +org-todo-active)
+ ("STRT" . +org-todo-active)
+ ("[?]" . +org-todo-onhold)
+ ("WAIT" . +org-todo-onhold)
+ ("HOLD" . +org-todo-onhold)
+ ("PROJ" . +org-todo-project)
+ ("NO" . +org-todo-cancel)
+ ("KILL" . +org-todo-cancel)))
(provide 'elchemy-user)
diff --git a/elchemy.el b/elchemy.el
index a4e224b..c4075c4 100644
--- a/elchemy.el
+++ b/elchemy.el
@@ -1,14 +1,15 @@
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives
- '("melpa" . "https://melpa.org/packages/") t)
+ '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
-(add-to-list 'load-path "~/.elchemy/")
+(setq elchemy/elchemy-root "~/.elchemy/")
+(add-to-list 'load-path elchemy/elchemy-root)
(require 'elchemy-boilerplate)
(require 'elchemy-user)
(require 'elchemy-util)
@@ -17,12 +18,7 @@
(require 'elchemy-keys)
(require 'elchemy-hooks)
-(setq inhibit-startup-screen t)
(toggle-frame-maximized)
-;;(require 'elchemy-splash)
-
-(put 'narrow-to-region 'disabled nil)
-(put 'downcase-region 'disabled nil)
(require 'elchemy-personal)
(custom-set-faces
@@ -30,7 +26,7 @@
;; 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.
- '(header-line ((t (:inherit mode-line :background "gray95" :foreground "grey20" :box nil :height 1.1))))
+ '(mode-line ((t (:background "grey95" :foreground "gray20" :height 1.1))))
'(org-document-title ((t (:height 2.0 :underline nil))))
'(org-document-info-keyword ((t (:foreground "gray100" :height 0.1))))
'(org-level-1 ((t (:inherit outline-1 :extend nil :weight extra-bold :height 1.4))))