404 lines
12 KiB
Org Mode
404 lines
12 KiB
Org Mode
#+PROPERTY: header-args :tangle config.el
|
|
|
|
* My Info
|
|
Basic info for some templates
|
|
|
|
#+begin_src elisp
|
|
(setq user-full-name "Joe Bellus"
|
|
user-mail-address "joe@5sigma.io")
|
|
#+end_src
|
|
|
|
* Appearance
|
|
** Fonts
|
|
Setup default fonts and faces.
|
|
#+begin_src elisp
|
|
(setq doom-font (font-spec :family "JetBrains Mono" :size 16 :weight 'semi-bold)
|
|
doom-variable-pitch-font (font-spec :family "Iosevka" :size 16 :weight 'light)
|
|
doom-big-font (font-spec :family "Iosevka" :size 22. :weight 'semi-bold)
|
|
doom-themes-enable-bold t
|
|
doom-themes-enable-italic t
|
|
)
|
|
#+end_src
|
|
|
|
** Theme
|
|
#+begin_src elisp
|
|
(setq doom-theme 'doom-palenight)
|
|
;; (after! doom-themes
|
|
;; (load-theme 'doom-nano-light t))
|
|
;; (use-package! doom-nano-modeline
|
|
;; :config
|
|
;; (doom-nano-modeline-mode 1)
|
|
;; (global-hide-mode-line-mode nil))
|
|
#+end_src
|
|
|
|
** Translucency
|
|
Setup some translucency to make things look nice.
|
|
#+begin_src emacs-lisp
|
|
(set-frame-parameter (selected-frame) 'alpha '(95 95))
|
|
(add-to-list 'default-frame-alist '(alpha 95 95))
|
|
#+end_src
|
|
|
|
* Startup
|
|
** Load custom scripts
|
|
#+begin_src elisp
|
|
(add-to-list 'load-path "~/.config/doom/el")
|
|
#+end_src
|
|
|
|
** Startup buffer
|
|
#+begin_src elisp
|
|
(setq +doom-dashboard-menu-sections '
|
|
(
|
|
("Recently opened files" :icon
|
|
(nerd-icons-faicon "nf-fa-file_text" :face 'doom-dashboard-menu-title)
|
|
:action recentf-open-files)
|
|
("Open org-agenda"
|
|
:icon (nerd-icons-octicon "nf-oct-calendar" :face 'doom-dashboard-menu-title)
|
|
:when (fboundp 'org-agenda)
|
|
:action org-agenda)
|
|
("Open Notes"
|
|
:icon (nerd-icons-faicon "nf-fa-file_text" :face 'doom-dashboard-menu-title)
|
|
:action +default/browse-notes)
|
|
))
|
|
|
|
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-shortmenu)
|
|
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-banner)
|
|
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-footer)
|
|
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-loaded)
|
|
|
|
(setq +doom-dashboard-banner-padding '(1 . 1))
|
|
(add-hook! '+doom-dashboard-functions :append 'doom-dashboard-widget-shortmenu)
|
|
(add-hook! '+doom-dashboard-functions :append 'doom-dashboard-widget-loaded)
|
|
#+end_src
|
|
|
|
* Editor
|
|
** Line numbering
|
|
Enable basic line numbering
|
|
|
|
#+begin_src elisp
|
|
(setq display-line-numbers-type t)
|
|
#+end_src
|
|
|
|
** Quit Confirmation
|
|
Don't prompt to quit
|
|
|
|
#+begin_src elisp
|
|
(setq confirm-kill-emacs nil)
|
|
#+end_src
|
|
|
|
* Org Mode
|
|
** General settings
|
|
#+begin_src elisp
|
|
(require 'org)
|
|
(setq org-ellipsis " ⋯"
|
|
org-hide-emphasis-markers t
|
|
org-src-fontify-natively t
|
|
org-fontify-quote-and-verse-blocks t
|
|
org-src-tab-acts-natively t
|
|
org-hide-block-startup nil
|
|
org-startup-folded 'content
|
|
org-cycle-separator-lines 2
|
|
org-directory "~/org/"
|
|
org-agenda-files '("~/org/" "~/org/agenda/" "~/org/agenda/projects/")
|
|
)
|
|
|
|
(setq-default prettify-symbols-alist '(("#+BEGIN_SRC" . "⇨")
|
|
("#+END_SRC" . "")
|
|
("#+begin_src" . "⇨")
|
|
("#+end_src" . "")))
|
|
(setq prettify-symbols-unprettify-at-point 'right-edge)
|
|
|
|
(defun org-setup ()
|
|
(setq-local display-line-numbers nil))
|
|
(add-hook 'org-mode-hook 'org-setup)
|
|
#+end_src
|
|
|
|
** Visual fill column
|
|
#+begin_src elisp
|
|
(setq visual-fill-column-width 110
|
|
visual-fill-column-center-text t)
|
|
#+end_src
|
|
|
|
** Org presentation
|
|
#+begin_src elisp
|
|
(defun my/org-present-start ()
|
|
(visual-fill-column-mode 1)
|
|
(setq header-line-format " ")
|
|
(visual-line-mode 1)
|
|
(hide-mode-line-mode)
|
|
(setq-local
|
|
hl-line-mode nil)
|
|
(setq-local face-remapping-alist
|
|
'((default (:height 1.5) variable-pitch)
|
|
(header-line (:height 4.0) variable-pitch)
|
|
(org-document-title (:height 1.75) org-document-title)
|
|
(org-code (:height 1.55) org-code)
|
|
(org-verbatim (:height 1.55) org-verbatim)
|
|
(org-block (:height 1.25) org-block)
|
|
(org-block-begin-line (:height 0.7) org-block)))
|
|
)
|
|
|
|
(defun my/org-present-end ()
|
|
(visual-fill-column-mode 0)
|
|
(hide-mode-line-mode)
|
|
(visual-line-mode 0)
|
|
(setq header-line-format nil)
|
|
(setq-local face-remapping-alist nil
|
|
hl-line-mode t))
|
|
(add-hook 'org-present-mode-hook 'my/org-present-start)
|
|
(add-hook 'org-present-mode-quit-hook 'my/org-present-end)
|
|
#+end_src
|
|
|
|
** Setup org header faces
|
|
#+begin_src elisp
|
|
(dolist
|
|
(face '((org-level-1 . 1.2)
|
|
(org-level-2 . 1.1)
|
|
(org-level-3 . 1.05)
|
|
(org-level-4 . 1.0)
|
|
(org-level-5 . 1.0)
|
|
(org-level-6 . 1.0)
|
|
(org-level-7 . 1.0)
|
|
(org-level-8 . 1.0)))
|
|
(set-face-attribute (car face) nil
|
|
:font "Iosevka"
|
|
:weight 'medium
|
|
:height (cdr face)))
|
|
(set-face-attribute 'org-document-title nil :font "Iosevka" :weight 'bold :height 1.3)
|
|
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
|
|
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
|
|
(set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
|
|
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
|
|
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
|
|
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
|
|
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
|
|
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
|
|
(set-face-attribute 'bold nil :foreground "#c678dd" :weight 'extrabold)
|
|
#+end_src
|
|
|
|
** Bullets
|
|
#+begin_src elisp
|
|
(use-package org-bullets
|
|
:after org
|
|
:hook (org-mode . org-bullets-mode)
|
|
:custom
|
|
(org-bullets-bullet-list '("⁖" "◉" "○" "●" "○" "●" "○" "●")))
|
|
#+end_src
|
|
|
|
** Capture templates
|
|
#+begin_src elisp
|
|
(setq +org-capture-todo-file "agenda/tasks.org")
|
|
(setq +org-capture-notes-file "notes/personal/index.org")
|
|
|
|
(setq org-capture-templates
|
|
'(
|
|
("n" "Notes")
|
|
("nq" "Quikerve notes" entry
|
|
(file+headline "notes/quikserve/index.org" "Inbox")
|
|
"* %u %?\n%i\n%a" :prepend t)
|
|
("np" "Personal notes" entry
|
|
(file+headline +org-capture-notes-file "Inbox")
|
|
"* %u %?\n%i\n%a" :prepend t)
|
|
|
|
|
|
("t" "Tasks")
|
|
("tp" "Personal todo" entry
|
|
(file+headline +org-capture-todo-file "Inbox")
|
|
"* TODO %?\n%i\n%a" :prepend t)
|
|
("tq" "Quikserve todo" entry
|
|
(file+headline "agenda/quikserve.org" "Inbox")
|
|
"* TODO %?\n%i\n%a" :prepend t)
|
|
|
|
|
|
("j" "Journal")
|
|
("jp" "Personal journal" entry
|
|
(file+olp+datetree "journal/personal.org")
|
|
"* %U %?\n%i\n%a" :prepend t)
|
|
("jq" "Quikserve journal" entry
|
|
(file+olp+datetree "journal/quikserve.org")
|
|
"* %U %?\n%i\n%a" :prepend t)
|
|
|
|
("p" "Templates for projects")
|
|
("pt" "Project TODO" entry (file+headline project-agenda-file "Inbox")
|
|
"* TODO %?\n%i\n%a" :prepend t)
|
|
("pn" "Project notes" entry (file+headline project-notes-file "Quicknotes")
|
|
"* %U %?\n%i\n%a" :prepend t)
|
|
("pc" "Project-local changelog" entry
|
|
(file+headline +org-capture-project-changelog-file "Unreleased")
|
|
"* %U %?\n%i" :prepend t)))
|
|
|
|
(defun project-agenda-file ()
|
|
(expand-file-name (concat "agenda/projects/" (project-name (project-current)) ".org") org-directory))
|
|
|
|
(defun project-notes-file ()
|
|
(expand-file-name (concat "notes/projects/" (project-name (project-current)) ".org") org-directory))
|
|
#+end_src
|
|
|
|
** Don't show before schedule time
|
|
Hide items in the TODO list and agenda if they have a scheduled time that has not passed
|
|
#+begin_src elisp
|
|
(setq org-agenda-todo-ignore-scheduled 'future)
|
|
(setq org-agenda-todo-ignore-with-date t)
|
|
(setq org-agenda-tags-todo-honor-ignore-options t)
|
|
(setq org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled)
|
|
#+end_src
|
|
** Latex
|
|
#+begin_src elisp
|
|
(setq org-export-with-author t)
|
|
(setq org-export-with-date t)
|
|
(setq org-export-with-toc t)
|
|
(setq org-export-with-section-numbers nil)
|
|
(setq org-latex-toc-command "\\tableofcontents \\clearpage")
|
|
(setq org-latex-tables-centered nil)
|
|
(setq org-latex-tables-booktabs nil)
|
|
(setq org-latex-default-class "document")
|
|
(add-to-list 'org-latex-packages-alist '("" "listings"))
|
|
(add-to-list 'org-latex-packages-alist '("" "color"))
|
|
(with-eval-after-load 'ox-latex
|
|
(add-to-list 'org-latex-classes
|
|
'("quikserve"
|
|
"
|
|
\\documentclass{article}
|
|
[DEFAULT-PACKAGES]
|
|
\\include{/home/joe/org/assets/quikserve.tex}
|
|
[EXTRA]
|
|
"
|
|
("\\section{%s}" . "\\section*{%s}")
|
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
|
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
|
|
)
|
|
)
|
|
|
|
#+end_src
|
|
|
|
* Email
|
|
#+begin_src elisp
|
|
(set-email-account! "fivesigma"
|
|
'((mu4e-sent-folder . "/fivesigma/Sent")
|
|
(mu4e-drafts-folder . "/fivesigma/Drafts")
|
|
(mu4e-trash-folder . "/fivesigma/Trash")
|
|
(mu4e-refile-folder . "/fivesigm e/Archive")
|
|
(smtpmail-smtp-user . "joe@5sigma.io")
|
|
(mu4e-compose-signature . "\n\n\nThanks,\nJoe Bellus\n\n"))
|
|
)
|
|
|
|
(after! mu4e
|
|
(setq mu4e-update-interval 120)
|
|
(setq sendmail-program (executable-find "msmtp")
|
|
send-mail-function #'smtpmail-send-it
|
|
smtpmail-stream-type 'starttls
|
|
message-sendmail-f-is-evil t
|
|
message-sendmail-extra-arguments '("--read-envelope-from")
|
|
message-send-mail-function #'message-send-mail-with-sendmail))
|
|
|
|
(setq mu4e-bookmarks
|
|
'(
|
|
(:name "Inbox" :query "maildir:/fivesigma/Inbox" :key ?i)
|
|
(:name "Today's messages" :query "date:today..now" :key ?t)
|
|
(:name "Last 7 days" :query "date:7d..now" :hide-unread t :key ?r)
|
|
("flag:flagged" "Flagged messages" ?f)))
|
|
|
|
(setq mu4e-hide-index-messages t)
|
|
(setq mu4e-html2text-command 'mu4e-shr2text)
|
|
(setq shr-color-visible-luminance-min 60)
|
|
(setq shr-color-visible-distance-min 5)
|
|
(setq shr-use-colors nil)
|
|
(setq mu4e-get-mail-command "true")
|
|
#+end_src
|
|
|
|
* Language Server
|
|
#+begin_src elisp
|
|
(setq lsp-auto-execute-action nil)
|
|
#+end_src
|
|
#+end_src
|
|
* Clock table
|
|
Add a key bind to show a 'clocktable' report in a new buffer
|
|
#+begin_src elisp
|
|
(defun kb/show-clocktable ()
|
|
(interactive)
|
|
(get-buffer-create "clocktable")
|
|
(with-current-buffer "clocktable"
|
|
(org-mode)
|
|
(erase-buffer)
|
|
(setq-local org-link-descriptive (not org-link-descriptive))
|
|
(insert (org-clock-get-clocktable :scope 'agenda :fileskip0 t :stepskip0 t :link t))
|
|
)
|
|
(switch-to-buffer "clocktable")
|
|
)
|
|
|
|
(map! :leader
|
|
:desc "Show clocktable"
|
|
"o C" #'kb/show-clocktable)
|
|
#+end_src
|
|
|
|
* Tramp
|
|
Set tramp to default to ssh
|
|
#+begin_src elisp
|
|
(setq tramp-default-method "ssh")
|
|
#+end_src
|
|
|
|
* Conduct
|
|
#+begin_src elisp
|
|
(load "conduct.el" t t)
|
|
(map! :leader
|
|
:desc "Conduct"
|
|
"o c")
|
|
(map! :leader
|
|
:desc "Conduct run"
|
|
"o c r" #'conduct-run)
|
|
(map! :leader
|
|
:desc "Conduct kill"
|
|
"o c k" #'conduct-kill)
|
|
(map! :leader
|
|
:desc "Conduct show"
|
|
"o c b" #'conduct-show)
|
|
#+end_src
|
|
|
|
* Misc Key binds
|
|
** Project management
|
|
#+begin_src elisp
|
|
(map! :leader
|
|
:desc "Project terminal"
|
|
"p v" #'projectile-run-vterm-other-window)
|
|
|
|
(map! :leader "p F" nil)
|
|
(map! :leader "p g" nil)
|
|
(map! :leader "p t" nil)
|
|
(map! :leader "p C" nil)
|
|
(map! :leader "p c" nil)
|
|
(map! :leader "p s" nil)
|
|
|
|
#+end_src
|
|
|
|
** Utilities
|
|
#+begin_src elisp
|
|
(map! :leader "f c" (lambda () (interactive) (doom-project-browse "~/.config/nix/")))
|
|
#+end_src
|
|
|
|
** Code
|
|
#+begin_src elisp
|
|
(map! :leader "c X" #'flymake-show-project-diagnostics)
|
|
#+end_src
|
|
|
|
* Direnv
|
|
#+begin_src elisp
|
|
(direnv-mode)
|
|
(setq direnv-always-show-summary nil)
|
|
#+end_src
|
|
|
|
* Elixir
|
|
** LSP
|
|
#+begin_src elisp
|
|
;;(use-package lsp-mode
|
|
;; :commands lsp
|
|
;; :ensure t
|
|
;; :diminish lsp-mode
|
|
;; :hook
|
|
;; (elixir-mode . lsp)
|
|
;; :init
|
|
;; (setq lsp-elixir-suggest-specs nil)
|
|
;; (add-to-list 'auto-mode-alist '("\\.heex\\'" . elixir-mode))
|
|
;; (add-to-list 'exec-path "~/.local/share/elixir-ls"))
|
|
#+end_src
|