|
|
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional.
(setq user-full-name "Matthew Lemon"
user-mail-address "matt@matthewlemon.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-unicode-font' -- for unicode glyphs
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
(setq doom-font (font-spec :family "Iosevka Regular" :size 18)
doom-variable-pitch-font (font-spec :family "Iosevka Regular" :size 20))
;;
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-gruvbox)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
;;
;; Basic agenda stuff
(after! org
(setq org-directory "~/org/")
(setq org-deadline-warning-days 4)
(setq org-clock-persist 'history)
(org-clock-persistence-insinuate)
(setq org-agenda-span 'week)
(setq org-agenda-start-day "today")
(setq org-directory "~/org")
(setq org-agenda-files (quote ("~/org/home.org"
"~/org/projects.org"
"~/org/journal.org"
"~/org/work.org"
"~/org/notes.org"
"~/org/habits.org"
"~/org/calendar/cal.org")))
(setq org-default-notes-file (concat org-directory "/notes.org"))
(setq org-agenda-window-setup 'current-window)
(setq org-agenda-start-with-log-mode t)
(setq org-M-RET-may-split-line '(default . nil))
(setq org-enforce-todo-dependencies t)
(setq org-log-done 'time)
(setq org-log-done-with-time 'note)
(setq diary-file "~/org/diary")
(setq org-agenda-include-diary nil)
(setq org-agenda-diary-file "~/org/calendar/cal.org")
(setq org-agenda-show-future-repeats t)
(setq org-agenda-skip-deadline-if-done t)
(setq org-agenda-skip-scheduled-if-done t)
(setq org-reverse-note-order t)
(setq org-habit-graph-column 45)
(setq org-agenda-sort-notime-is-late nil)
(setq org-columns-default-format "%50ITEM(Task) %10CLOCKSUM %25TIMESTAMP_IA")
(setq org-archive-location "~/org/archive.org::* From %s")
(setq org-refile-targets (quote ((nil :maxlevel . 9)
(org-agenda-files :maxlevel . 9))))
;; Basic org keybindings
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(global-set-key "\C-cc" 'org-capture)
;;
;; Agenda dispatcher
(setq org-agenda-custom-commands
'(("w" . "Work")
("wt" "Agenda + Work TODO"
(
(agenda "")
(tags-todo "+@work-TODO=\"WAITING\"-SCHEDULED>=\"<today>\""
((org-agenda-overriding-header "Work TODO UNSCHEDULED")))
(tags-todo "+@work+TODO=\"WAITING\""
((org-agenda-overriding-header "Work WAITING")))
))
("wn" "Agenda + Work NEXT"
(
(agenda)
(tags-todo "+@work+TODO=\"NEXT\"-SCHEDULED>=\"<today>\""
((org-agenda-overriding-header "Work NEXT UNSCHEDULED")))
(tags-todo "+@work+TODO=\"WAITING\""
((org-agenda-overriding-header "Work WAITING")))
))
("wp" "Work Project NEXT"
(
(agenda)
(tags-todo "+@work+TODO=\"NEXT\"+CATEGORY=\"Project\""
((org-agenda-overriding-header "Work Project NEXT actions")))
))
("h" . "Home")
("hh" "Agenda + Home TODO"
(
(agenda "")
(tags-todo "@home-SCHEDULED>=\"<today>\"-TODO=\"WAITING\"-TODO=\"DOING\""
((org-agenda-overriding-header "Home TODO UNSCHEDULED")
(org-agenda-sorting-strategy '(deadline-down scheduled-down priority-down))))
(tags-todo "+@home+TODO=\"WAITING\""
((org-agenda-overriding-header "Home WAITING")))
(tags-todo "+@home+TODO=\"DOING\"" ((org-agenda-overriding-header "Home in progress")))
))
("hn" "Agenda + Home NEXT"
(
(agenda "")
(tags-todo "+@home+TODO=\"NEXT\"-SCHEDULED>=\"<today>\""
((org-agenda-overriding-header "Home NEXT UNSCHEDULED")
(org-agenda-sorting-strategy '(deadline-down scheduled-down priority-down))))
(tags-todo "+@home+TODO=\"DOING\""
((org-agenda-overriding-header "Home in progress")))
))
("n" "Agenda + All NEXT"
(
(agenda "")
(todo "NEXT")))
("t" "Agenda + All TODO"
(
(agenda "")
(alltodo "")))
("W" "Agenda + All WAITING"
(
(agenda "")
(todo "WAITING")))
("i" tags "idea")
))
;; org capture templates
(setq org-capture-templates
(quote (("h" "Home Tasks & Notes")
("x" "Protocol Capture" entry (file+olp+datetree "~/org/capture.org" "Web Capture")
"* %^{Title or Comment}\nDescription: %:description\nSource: %:link\n%:initial")
("ht" "Home TODO" entry (file+headline "~/org/home.org" "Tasks")
"** TODO %?\nEntered on %U\n"
:prepend t)
("hn" "Home NEXT" entry (file+headline "~/org/home.org" "Tasks")
"** NEXT %?\nEntered on %U\n"
:prepend t)
("hN" "Home Note" entry (file+headline "~/org/home.org" "Notes")
"* %?\nEntered on %U\n")
("hj" "Journal" entry (file+olp+datetree "~/org/journal.org" "Journal")
"* %?\nEntered on %U\n")
("hi" "Home Idea" entry (file+headline "~/org/notes.org" "Notes")
"** %? :idea:\nEntered on %U\n")
("hc" "Home Calendar - Single" entry (file+headline "~/org/home.org" "Calendar")
"* %?\n%^T")
("hb" "Home Calendar - Block" entry (file+headline "~/org/home.org" "Calendar")
"* %?\n%^t--%^t")
("w" "Work Tasks & Notes")
("wt" "Work TODO" entry (file+headline "~/org/work.org" "Tasks")
"** TODO %?\nEntered on %U\n"
:prepend t)
("wn" "Work NEXT" entry (file+headline "~/org/work.org" "Tasks")
"** NEXT %?\nEntered on %U\n"
:prepend t)
("wN" "Note" entry (file+headline "~/org/work.org" "Notes")
"* %?\nEntered on %U\n")
("wc" "Note from Clipboard" entry (file+headline "~/org/work.org" "Notes")
"* %?\n\t\n%c")
("wr" "Note from Region" entry (file+headline "~/org/work.org" "Notes")
"* %?\n\t\n%i")
("wj" "Journal" entry (file+olp+datetree "~/org/work.org" "Journal")
"** %?\nEntered on %U\n")
("wd" "Retrospective Tasks" entry (file+headline "~/org/work.org" "Tasks")
"* DONE %?\nCLOSED: %U")
("wc" "Work Calendar - Single" entry (file+headline "~/org/work.org" "Calendar")
"* %?\n:PROPERTIES:\n:CATEGORY: WorkCal\n:END:\n%^T")
("wb" "Work Calendar - Block" entry (file+headline "~/org/work.org" "Calendar")
"* %?\n:PROPERTIES:\n:CATEGORY: WorkCal\n:END:\n%^t--%^t")
("wp" "Work Calendar - Trip" entry (file+headline "~/org/work.org" "Work Trips")
"* %?\n%^t--%^t")
("wm" "Work Calendar - Meeting" entry (file+headline "~/org/work.org" "Meetings")
"* %?\n:PROPERTIES:\n:CATEGORY: Meeting\n:END:\n%^T")
("e" "Emacs Tip")
("et" "Emacs Tip" entry (file+headline "~/org/emacs-tips.org" "Emacs Tips")
"* %?\n\t%a")
("er" "Emacs Tip from Region" entry (file+headline "~/org/emacs-tips.org" "Emacs Tips")
"* %?\n\t%i")
)))
;; org tags
(setq org-tag-alist '(
;; Depth
("immersive" . ?i) ;; "Deep"
("process" . ?p) ;; "Shallow"
("offdesk" . ?o) ;; "Away from desk"
;; Type
("brainstorm" . ?b)
("idea" . ?d)
;; Context
("@work" . ?w)
("@home" . ?h)
("errand" . ?e)
("emacs" . ?E)
;; Energy
("Challenge" . ?1)
("Average" . ?2)
("Easy" . ?3)
;; Misc
("Maybe" . ?m)
))
;; org agenda should be full screen
(defun open-agenda ()
"Open the org-agenda."
(interactive)
(let ((agenda "*Org Agenda*"))
(if (equal (get-buffer agenda) nil)
(org-agenda-list)
(unless (equal (buffer-name (current-buffer)) agenda)
(switch-to-buffer agenda))
(org-agenda-redo t)
(beginning-of-buffer))))
;; org handling to-do items
;; Put state transition logs into a drawer called LOGBOOK
(setq org-log-into-drawer t)
(setq org-todo-keywords
(quote ((sequence "TODO(t)" "NEXT(n)" "DOING" "|" "DONE(d!)")
(sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)")
)))
(setq org-todo-keyword-faces
(quote (("TODO" :foreground "red" :weight bold)
("NEXT" :foreground "cyan" :weight bold)
("DOING" :foreground "orchid" :weight bold)
("DONE" :foreground "forest green" :weight bold)
("WAITING" :foreground "orange" :weight bold)
("HOLD" :foreground "magenta" :weight bold)
("CANCELLED" :foreground "forest green" :weight bold))))
;; tag stuff automatically dependent on a change of state
(setq org-todo-state-tags-triggers
(quote (("CANCELLED" ("CANCELLED" . t))
("WAITING" ("WAITING" . t))
("HOLD" ("WAITING") ("HOLD" . t))
(done ("WAITING") ("HOLD"))
("TODO" ("WAITING") ("CANCELLED") ("HOLD"))
("NEXT" ("WAITING") ("CANCELLED") ("HOLD"))
("DONE" ("WAITING") ("CANCELLED") ("HOLD")))))
;; Get more priority options
(setq org-highest-priority ?A)
(setq org-default-priority ?C)
(setq org-lowest-priority ?E)
(setq org-priority-faces
'((?A . (:foreground "#CC0000" :background "#FFE3E3"))
(?B . (:foreground "#64992C" :background "#EBF4DD"))
(?C . (:foreground "#64992C" :background "#FFFFFF"))))
(setq org-ellipsis "...")
)
;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
;; (after! PACKAGE
;; (setq x y))
;;
;; The exceptions to this rule:
;;
;; - Setting file/directory variables (like `org-directory')
;; - Setting variables which explicitly tell you to set them before their
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
;; - Setting doom variables (which start with 'doom-' or '+').
;;
;; Here are some additional functions/macros that will help you configure Doom.
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
;; etc).
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
|