diff options
Diffstat (limited to '.config/emacs/modules/bd--org.el')
| -rw-r--r-- | .config/emacs/modules/bd--org.el | 255 |
1 files changed, 0 insertions, 255 deletions
diff --git a/.config/emacs/modules/bd--org.el b/.config/emacs/modules/bd--org.el deleted file mode 100644 index b32af41..0000000 --- a/.config/emacs/modules/bd--org.el +++ /dev/null @@ -1,255 +0,0 @@ -;;; -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - - -(require 'fill-column) -(use-package org - :demand t - :hook - ((org-mode . (lambda () - (org-indent-mode) - (org-toggle-inline-images) - (fill-column-mode) - (abbrev-mode) - (org-latex-preview '(16))))) - :config - (setopt org-ellipsis " ▾" - org-babel-python-command "python3" - org-confirm-babel-evaluate nil - org-hide-emphasis-markers t - org-startup-folded 'showeverything - org-src-window-setup 'current-window) - (plist-put org-format-latex-options :scale 1.3) - (push '("\\.pdf\\'" . "zathura %s") org-file-apps) - (add-hook 'org-babel-after-execute-hook #'org-redisplay-inline-images) - (org-babel-do-load-languages - 'org-babel-load-languages - '((emacs-lisp . t) - (shell . t) - (lisp . t) - (scheme . t) - (dot . t) - (latex . t) - (python . t))) - (define-abbrev org-mode-abbrev-table - "lbm" "\\begin{equation*}\n\\begin{bmatrix}\n\\end{bmatrix}\n\\end{equation*}") - (define-abbrev org-mode-abbrev-table - "lca" "\\begin{equation*}\n\\begin{cases}\n\\end{cases}\n\\end{equation*}") - (define-abbrev org-mode-abbrev-table - "gvd" "#+begin_src dot :file images/1.png\ndigraph g {\nrankdir=LR;\n\tnode [shape = doublecircle]; A;\n\tnode [shape = point]; qi\n\tnode[shape=circle];\n}\n#+end_src") - (define-abbrev org-mode-abbrev-table - "les" "\\begin{equation*}\n\\end{equation*}") - (define-abbrev org-mode-abbrev-table - "lbm" "\\begin{equation*}\n\\begin{bmatrix}\n\\end{bmatrix}\n\\end{equation*}") - (define-abbrev org-mode-abbrev-table - "lds" "\\begin{drawstack}\n\\end{drawstack}")) - -(use-package ox - :config - (add-to-list 'org-latex-packages-alist '("" "listings")) - (setopt org-latex-toc-command "\\tableofcontents \\clearpage" - org-latex-src-block-backend 'listings - org-latex-image-default-width ".6\\linewidth" - org-latex-compiler "xelatex" - org-export-with-toc nil - org-export-preserve-breaks nil - org-latex-classes - '(("article" - "\\PassOptionsToPackage{svgnames}{xcolor} -\\documentclass[11pt]{article} -\\usepackage[margin=1in]{geometry} -\\usepackage{xcolor,color,tikz,amsmath,amssymb,amsthm,amsfonts,graphicx,enumitem,listings,comment} -\\lstset{frame=single,aboveskip=1em, - framesep=.5em,backgroundcolor=\\color{AliceBlue}, - rulecolor=\\color{Black},framerule=1pt} -\\usepackage{xcolor} -\\newcommand\\basicdefault[1]{\\scriptsize\\color{Black}\\fontfamily{pcr}\\selectfont} -\\lstset{basicstyle=\\basicdefault{\\spaceskip1em}} -\\lstset{keywordstyle=\\color{DarkGreen}\\bfseries, - identifierstyle=\\color{DarkRed}, - commentstyle=\\color{DimGray}\\upshape, - stringstyle=\\color{DarkBlue}\\upshape, - emphstyle=\\color{Chocolate}\\upshape, - showstringspaces=false, - columns=fullflexible, - keepspaces=true} -\\lstset{columns=fullflexible,basicstyle=\\ttfamily} -\\setlength{\\headsep}{0.75 in} -\\setlength{\\parskip}{0.1 in} - -\\makeatletter -\\renewcommand{\\maketitle}{% - \\begingroup\\parindent0pt - \\begin{center} - \\LARGE{\\bfseries\\@title}\\par\\bigskip - \\large{\\@author}\\par\\medskip - \\normalsize\\@date\\par\\bigskip - \\end{center} - \\endgroup\\@afterindentfalse\\@afterheading} -\\makeatother -[DEFAULT-PACKAGES] -\\hypersetup{linkcolor=Blue,urlcolor=DarkBlue, - citecolor=DarkRed,colorlinks=true} -[PACKAGES] -[EXTRA]" - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}") - ("\\paragraph{%s}" . "\\paragraph*{%s}") - ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) - ("report" "\\documentclass[11pt]{report}" - ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) - ("acmart" "\\PassOptionsToPackage{svgnames}{xcolor} -\\documentclass[sigconf,authorversion,nonacm]{acmart} -\\usepackage{xcolor,color,tikz,amsmath,amssymb,amsthm,amsfonts,graphicx,enumitem,listings,comment} -\\usepackage{xcolor} -\\lstset{frame=single,aboveskip=1em, - framesep=.5em,backgroundcolor=\\color{AliceBlue}, - rulecolor=\\color{Black},framerule=1pt} -\\lstset{keywordstyle=\\color{DarkGreen}\\bfseries, - identifierstyle=\\color{DarkRed}, - commentstyle=\\color{DimGray}\\upshape, - stringstyle=\\color{DarkBlue}\\upshape, - emphstyle=\\color{Chocolate}\\upshape, - showstringspaces=false, - columns=fullflexible, - keepspaces=true}" - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}") - ("\\paragraph{%s}" . "\\paragraph*{%s}") - ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) - ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}") - ("\\chapter{%s}" . "\\chapter*{%s}") - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))) - -(use-package oc - :config - (setopt org-cite-global-bibliography - (directory-files-recursively - (concat (xdg-user-dir "DOCUMENTS") "/bib/") - ".*\\.bib$") - org-cite-export-processors - '((latex biblatex)))) - -(use-package org-agenda - :bind - (("C-c n a" . org-agenda) - ("C-c n c" . org-capture) - ("C-c n s" . org-schedule) - ("C-c n d" . org-deadline) - ("C-c n r" . org-refile)) - :config - (advice-add 'org-refile :after 'org-save-all-org-buffers) - - (defvar-local bd/course-list - '(("598" . ?0)) - "Courses for tagging, capturing, and various -agenda views.") - - (defvar-local bd/device-list - '(("garm" . ?G) - ("heimdallr" . ?H) - ("hodr" . ?M) - ("surt" . ?I) - ("vali" . ?V)) - "Devices for tagging, capturing, and various -agenda views.") - - (defun bd/combine-tags (tag-alist add? or-p) - "Given TAG-ALIST in the form of -ORG-TAG-ALIST, returns a concatenated string -representing all the tags ORd or ANDed together." - (apply #'concat - (mapcar (lambda (e) - (concat (when or-p "|") (if add? "+" "-") (car e))) - tag-alist))) - - (setopt org-log-done 'time - org-deadline-warning-days 7 - org-log-into-drawer "history" - org-agenda-restore-windows-after-quit t - org-agenda-show-future-repeats nil - org-agenda-block-separator nil - org-deadline-warning-days 0 - org-todo-keywords - '((sequence "TODO(t)" "NEXT(n!)" "HOLD(h!)" "|" "DONE(d)" "CANC(c)")) - org-tag-alist - `(("noexport" . ?e) - - ("chore" . ?C) - ,@bd/device-list - - ("idea" . ?i) - ("programming" . ?p) - ("web" . ?s) - ("writing" . ?w) - ("reading" . ?r) - - ,@bd/course-list) - org-directory "~/dc/agenda/" - - org-agenda-files (list org-directory) - org-refile-use-outline-path 'file - org-refile-targets '((org-agenda-files :level . 0)) - org-capture-templates - `(("t" "Task Entry" entry - (file ,(concat org-directory "inbox.org")) - "* %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n%i\nrecorded visiting: %a" - :empty-lines 1))) - - (let ((orphan-view '(tags-todo "-{.*}" - ((org-agenda-overriding-header "\nUnfiltered Items\n"))))) - (setopt org-agenda-custom-commands - `(("c" "Chores" - ((agenda "" ((org-agenda-entry-types '(:deadline)) - (org-agenda-show-all-dates nil) - (org-agenda-span 21) - (org-agenda-skip-function - '(org-agenda-skip-entry-if 'notregexp - (regexp-opt (cons "chore" (mapcar #'car bd/device-list))))) - (org-agenda-overriding-header "Priority Deadlines (+21d)\n"))) - (tags-todo (concat "chore" (bd/combine-tags bd/device-list nil nil)) - ((org-agenda-overriding-header "\nMundane\n"))) - ,@(mapcar (lambda (e) - `(tags-todo ,(car e) - ((org-agenda-overriding-header - (concat "\nDevice: " ,(capitalize (car e)) "\n"))))) - bd/device-list) - ,orphan-view)) - ("r" "Recreational" - ((tags-todo "+idea" - ((org-agenda-skip-function - '(org-agenda-skip-entry-if 'regexp "chore")) - (org-agenda-overriding-header "Ideas\n"))) - (tags-todo "+reading|+writing" - ((org-agenda-skip-function - '(org-agenda-skip-entry-if 'regexp "chore")) - (org-agenda-overriding-header "\nReading/Writing\n"))) - (tags-todo "+programming|+web" - ((org-agenda-skip-function - '(org-agenda-skip-entry-if 'regexp "chore")) - (org-agenda-overriding-header "\nProgramming\n"))) - ,orphan-view)) - ("s" "College" - ((tags-todo (bd/combine-tags bd/course-list t t) - ((org-agenda-overriding-header "\nAll Courses\n"))) - (agenda "" ((org-agenda-entry-types '(:deadline :scheduled)) - (org-agenda-show-all-dates nil) - (org-agenda-span 15) - (org-scheduled-past-days 7) - (org-agenda-skip-function - '(org-agenda-skip-entry-if 'notregexp - (regexp-opt (mapcar #'car bd/course-list)))) - (org-agenda-overriding-header "\nUpcoming Deadlines (+15d)\n"))) - ,orphan-view)))))) - - -(provide 'bd--org) -;;; bd--org.el ends here |
