├── .gitignore ├── snippets ├── org-mode │ ├── text │ ├── mathbb │ ├── mathcal │ ├── org-today │ ├── fraction │ ├── org latex inline │ ├── superscript latex │ ├── tmp_png │ ├── align │ ├── round_brackets │ ├── Single Line Latex │ ├── Multi-line latex │ ├── Hugo Image │ ├── R cell │ ├── pmatrix │ ├── html export │ ├── jupyter-julia │ ├── python cell │ ├── ox-hugo blog │ ├── Tangle Tree │ ├── ox-hugo images │ ├── Tangle Subtree │ ├── julia-emacs │ ├── R Function │ ├── org R exports header │ ├── python cell no session │ ├── R plotting org babel │ ├── PR Review Checklist │ ├── julia plot │ ├── meeting entry │ ├── Choice template │ ├── interview │ ├── Ticket │ └── School Work Period ├── inf-ruby-mode │ ├── next │ ├── step │ └── disable-pry ├── latex │ └── better matrix ├── markdown-mode │ └── R cell ├── ruby-mode │ └── binding.pry ├── org │ └── export R └── org-journal-mode │ └── Day Envisioned ├── template ├── sketch_template.kra └── uwmathcn.cls ├── machine_specific ├── xephyr_script.sh ├── windows_pc.el ├── work_mac.el ├── startup.sh ├── exwm-conf.el └── linux_pc.el ├── themes ├── imgs │ └── external-content.duckduckgo.com.jpeg ├── base16-blonde.el ├── blonde-theme.el ├── doom-wonder-egg-green-theme.el └── doom-wonder-egg-theme.el ├── custom_packages ├── org-krita-0.1.1 │ ├── resources │ │ ├── template.kra │ │ └── template.kra~ │ ├── org-krita-pkg.el │ └── org-krita.el └── scimax-inkscape.el ├── private-template.el ├── README.org ├── secondary-func.el ├── phone-packages.el ├── elfeed.org ├── packages.el ├── extra-func.el ├── org-roam-lite.el ├── custom.el ├── org-conf.el ├── config.el ├── core-func.el ├── init.el └── phone-init.el /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | *.log 4 | tmp/ 5 | private.el 6 | -------------------------------------------------------------------------------- /snippets/org-mode/text: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: text 3 | # key: \t 4 | # -- 5 | \text{$1}$0 -------------------------------------------------------------------------------- /snippets/org-mode/mathbb: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: mathbb 3 | # key: \mb 4 | # -- 5 | \mathbb{$0} -------------------------------------------------------------------------------- /snippets/org-mode/mathcal: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: mathcal 3 | # key: \mc 4 | # -- 5 | \mathcal{$0} -------------------------------------------------------------------------------- /snippets/org-mode/org-today: -------------------------------------------------------------------------------- 1 | # key: today 2 | # name: org-today 3 | # -- 4 | `(format-time-string "[%Y-%m-%d %a]")` -------------------------------------------------------------------------------- /template/sketch_template.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jparcill/emacs_config/HEAD/template/sketch_template.kra -------------------------------------------------------------------------------- /snippets/org-mode/fraction: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: fraction 3 | # key: \frac 4 | # -- 5 | \frac{$1}{$2}$0 -------------------------------------------------------------------------------- /snippets/org-mode/org latex inline: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: org latex inline 3 | # key: $ 4 | # -- 5 | $$0$ -------------------------------------------------------------------------------- /machine_specific/xephyr_script.sh: -------------------------------------------------------------------------------- 1 | Xephyr -br -ac -noreset -screen 1915x1080 :1 & 2 | sleep 0.2 3 | DISPLAY=:1 emacs 4 | -------------------------------------------------------------------------------- /snippets/inf-ruby-mode/next: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: next 3 | # key: n 4 | # uuid: next-snippet 5 | # -- 6 | next -------------------------------------------------------------------------------- /snippets/org-mode/superscript latex: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: superscript latex 3 | # key: ^ 4 | # -- 5 | ^{$0} -------------------------------------------------------------------------------- /snippets/inf-ruby-mode/step: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: step 3 | # key: s 4 | # uuid: step-snippet 5 | # -- 6 | step 7 | -------------------------------------------------------------------------------- /snippets/org-mode/tmp_png: -------------------------------------------------------------------------------- 1 | # key: tmp.png 2 | # name: tmp_png 3 | # -- 4 | `(format-time-string "/tmp/%Y-%m-%d-%hh-%mm-%ss.png")` -------------------------------------------------------------------------------- /snippets/org-mode/align: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: align 3 | # key: \al 4 | # -- 5 | \begin{align*} 6 | $0 7 | \end{align*} -------------------------------------------------------------------------------- /snippets/org-mode/round_brackets: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: round_brackets 3 | # key: \left( 4 | # -- 5 | \left($1\right)$0 -------------------------------------------------------------------------------- /snippets/latex/better matrix: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: better matrix 3 | # key: pmat 4 | # -- 5 | \begin{pmatrix} 6 | $1 7 | \end{pmatrix} -------------------------------------------------------------------------------- /snippets/markdown-mode/R cell: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: R cell 3 | # key: 6 | 7 | ;; This file is part of GNU Emacs. 8 | 9 | ;; GNU Emacs is free software: you can redistribute it and/or modify 10 | ;; it under the terms of the GNU General Public License as published by 11 | ;; the Free Software Foundation, either version 3 of the License, or 12 | ;; (at your option) any later version. 13 | 14 | ;; GNU Emacs is distributed in the hope that it will be useful, 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | ;; GNU General Public License for more details. 18 | 19 | ;; You should have received a copy of the GNU General Public License 20 | ;; along with GNU Emacs. If not, see . 21 | 22 | ;;; Commentary: 23 | 24 | ;; This module contains typical (yet minimal) configurations of EXWM. 25 | 26 | ;;; Code: 27 | (require 'exwm) 28 | 29 | (defun exwm-config-personal () 30 | 31 | 32 | ;; Make class name the buffer name 33 | (add-hook 'exwm-update-class-hook 34 | (lambda () 35 | (exwm-workspace-rename-buffer exwm-class-name))) 36 | 37 | ;; Global keybindings. 38 | (unless (get 'exwm-input-global-keys 'saved-value) 39 | (setq exwm-input-global-keys 40 | `(([?\s-r] . exwm-reset)))) 41 | 42 | 43 | 44 | ;; Line-editing shortcuts 45 | (setq exwm-input-simulation-keys 46 | '(([?\s-h] . [left]) 47 | ([?\s-l] . [right]) 48 | ([?\s-k] . [up]) 49 | ([?\s-j] . [down]))) 50 | 51 | ;; Disable menu-bar, tool-bar and scroll-bar to increase the usable space. 52 | (menu-bar-mode -1) 53 | (tool-bar-mode -1) 54 | (scroll-bar-mode -1) 55 | ;; Also shrink fringes to 1 pixel. 56 | (fringe-mode 1) 57 | ) 58 | 59 | ;;; exwm-config.el ends here 60 | -------------------------------------------------------------------------------- /custom.el: -------------------------------------------------------------------------------- 1 | (custom-set-variables 2 | ;; custom-set-variables was added by Custom. 3 | ;; If you edit it by hand, you could mess it up, so be careful. 4 | ;; Your init file should contain only one such instance. 5 | ;; If there is more than one, they won't work right. 6 | '(ansi-color-names-vector 7 | ["#2E3440" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#556b72"]) 8 | '(custom-safe-themes 9 | '("5a30261fdeb4c0d26cd7fb70d8dcd3cd00c660b15b9a26f71dbdf2bacd503b36" "e074be1c799b509f52870ee596a5977b519f6d269455b84ed998666cf6fc802a" "54cf3f8314ce89c4d7e20ae52f7ff0739efb458f4326a2ca075bf34bc0b4f499" "99ea831ca79a916f1bd789de366b639d09811501e8c092c85b2cb7d697777f93" "7a994c16aa550678846e82edc8c9d6a7d39cc6564baaaacc305a3fdc0bd8725f" "76bfa9318742342233d8b0b42e824130b3a50dcc732866ff8e47366aed69de11" "a92e9da0fab90cbec4af4a2035602208cebf3d071ea547157b2bfc5d9bd4d48d" "632694fd8a835e85bcc8b7bb5c1df1a0164689bc6009864faed38a9142b97057" default)) 10 | '(fci-rule-color "#D6D6D6") 11 | '(jdee-db-active-breakpoint-face-colors (cons "#FFFBF0" "#268bd2")) 12 | '(jdee-db-requested-breakpoint-face-colors (cons "#FFFBF0" "#859900")) 13 | '(jdee-db-spec-breakpoint-face-colors (cons "#FFFBF0" "#E1DBCD")) 14 | '(objed-cursor-color "#dc322f") 15 | '(org-modules '(org-habit)) 16 | '(package-selected-packages '(htmlize ox-hugo exwm)) 17 | '(pdf-view-midnight-colors (cons "#556b72" "#FDF6E3")) 18 | '(rustic-ansi-faces 19 | ["#FDF6E3" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#556b72"]) 20 | '(safe-local-variable-values '((lexical-biding . t))) 21 | '(vc-annotate-background "#FDF6E3") 22 | '(vc-annotate-color-map 23 | (list 24 | (cons 20 "#859900") 25 | (cons 40 "#959300") 26 | (cons 60 "#a58e00") 27 | (cons 80 "#b58900") 28 | (cons 100 "#bc7407") 29 | (cons 120 "#c35f0e") 30 | (cons 140 "#cb4b16") 31 | (cons 160 "#cd4439") 32 | (cons 180 "#d03d5d") 33 | (cons 200 "#d33682") 34 | (cons 220 "#d63466") 35 | (cons 240 "#d9334a") 36 | (cons 260 "#dc322f") 37 | (cons 280 "#dd5c56") 38 | (cons 300 "#de867e") 39 | (cons 320 "#dfb0a5") 40 | (cons 340 "#D6D6D6") 41 | (cons 360 "#D6D6D6"))) 42 | '(vc-annotate-very-old-color nil) 43 | '(warning-suppress-types '((emacs)))) 44 | (custom-set-faces 45 | ;; custom-set-faces was added by Custom. 46 | ;; If you edit it by hand, you could mess it up, so be careful. 47 | ;; Your init file should contain only one such instance. 48 | ;; If there is more than one, they won't work right. 49 | ) 50 | -------------------------------------------------------------------------------- /machine_specific/linux_pc.el: -------------------------------------------------------------------------------- 1 | ;;; machine_specific/linux_pc.el -*- lexical-binding: t; -*- 2 | ;; Font 3 | ;; 4 | ;;(setq doom-font (font-spec :family "Julia Mono" :size 18) 5 | ;; doom-variable-pitch-font (font-spec :family "Libre Baskerville" :size 19)) 6 | 7 | (setq org-file-path "~/Sync/Org/") 8 | 9 | (add-to-list 'exec-path "/home/jparcill/.local/bin") 10 | 11 | ;; Hydra 12 | (after! hydra 13 | ;; Adjusted +hydra/window-nav with ivy and undo 14 | (defhydra jparcill/hydra-window-nav (:hint nil) 15 | " 16 | Split: _v_ert _s_:horz 17 | Delete: _d_elete _D_:kill _o_nly 18 | Move Window: _h_:left _j_:down _k_:up _l_:right 19 | Buffers: _p_revious _n_ext _b_:select _f_ind-file _m_aximize 20 | Undo: _u_ndo _U_:Redo 21 | Move: _a_:up _z_:down 22 | Linux: _;_:apps _x_:scratch buffer _F_irefox 23 | " 24 | ("z" scroll-up-line) 25 | ("a" scroll-down-line) 26 | 27 | ("h" windmove-left) 28 | ("j" windmove-down) 29 | ("k" windmove-up) 30 | ("l" windmove-right) 31 | 32 | ("p" previous-buffer) 33 | ("n" next-buffer) 34 | ("b" ivy-switch-buffer) 35 | ("f" find-file) 36 | ("m" doom/window-maximize-buffer) 37 | 38 | ("u" tab-bar-history-back) 39 | ("U" tab-bar-history-forward) 40 | 41 | ("s" split-window-below) 42 | ("v" split-window-right) 43 | 44 | ("d" delete-window) 45 | ("D" kill-current-buffer) 46 | ("o" delete-other-windows) 47 | 48 | ("x" doom/open-scratch-buffer) 49 | (";" counsel-linux-app) 50 | ("F" browse-url-firefox) 51 | 52 | ("c" nil)) 53 | 54 | (defhydra jparcill/hydra-firefox () 55 | ("mg" (browse-url-firefox "https://gmail.com") "gmail") 56 | ("mm" (browse-url-firefox "https://messenger.com") "messenger") 57 | ("mo" (browse-url-firefox "https://outlook.office.com") "outlook") 58 | ("el" (browse-url-firefox "https://lichess.org") "lichess") 59 | ("ey" (browse-url-firefox "https://youtube.com") "youtube") 60 | ("et" (browse-url-firefox "https://twitter.com") "twitter") 61 | ("K" (kill-matching-buffers "firefox") "kill all firefox") 62 | ) 63 | ) 64 | 65 | ;; EXWM 66 | ;; (use-package! exwm 67 | ;; :config 68 | ;; ;; These bindings mimic some of the main bindings for doom emacs but with super instead. 69 | ;; (exwm-input-set-key (kbd "s-;") #'counsel-linux-app) 70 | ;; ;; have to do these twice because sometimes I press the keys too fast 71 | ;; (exwm-input-set-key (kbd "s-w s-h") #'evil-window-left) 72 | ;; (exwm-input-set-key (kbd "s-w h") #'evil-window-left) 73 | ;; (exwm-input-set-key (kbd "s-w s-l") #'evil-window-right) 74 | ;; (exwm-input-set-key (kbd "s-w l") #'evil-window-right) 75 | ;; (exwm-input-set-key (kbd "s-w s-j") #'evil-window-down) 76 | ;; (exwm-input-set-key (kbd "s-w j") #'evil-window-down) 77 | ;; (exwm-input-set-key (kbd "s-w s-k") #'evil-window-up) 78 | ;; (exwm-input-set-key (kbd "s-w k") #'evil-window-up) 79 | ;; 80 | ;; (exwm-input-set-key (kbd "s-w s") #'evil-window-split) 81 | ;; (exwm-input-set-key (kbd "s-w v") #'evil-window-vsplit) 82 | ;; (exwm-input-set-key (kbd "s-w u") #'jparcill/hydra-window-undo/body) 83 | ;; 84 | ;; (exwm-input-set-key (kbd "s-w m m") #'doom/window-maximize-buffer) 85 | ;; (exwm-input-set-key (kbd "s-w d") #'evil-window-delete) 86 | ;; (exwm-input-set-key (kbd "s-b b") #'+ivy/switch-buffer) 87 | ;; (exwm-input-set-key (kbd "s-b k") #'kill-current-buffer) 88 | ;; (exwm-input-set-key (kbd "s-b i") #'ibuffer) 89 | ;; (exwm-input-set-key (kbd "s-x") #'doom/open-scratch-buffer) 90 | ;; 91 | ;; (exwm-input-set-key (kbd "s-o t") #'+shell/toggle) 92 | ;; (exwm-input-set-key (kbd "s-f f") #'counsel-find-file) 93 | ;; (exwm-input-set-key (kbd "s-f r") #'counsel-recentf) 94 | ;; 95 | ;; (exwm-input-set-key (kbd " ]") #'tab-bar-switch-to-next-tab) 96 | ;; (exwm-input-set-key (kbd " [") #'tab-bar-switch-to-prev-tab) 97 | ;; (exwm-input-set-key (kbd " n") #'tab-bar-new-tab) 98 | ;; (exwm-input-set-key (kbd " d") #'tab-bar-close-tab) 99 | ;; (exwm-input-set-key (kbd " r") #'tab-bar-rename-tab) 100 | ;; (exwm-input-set-key (kbd "s-m") 'jparcill/hydra-window-nav/body) 101 | ;; (exwm-input-set-key (kbd "s-s") 'jparcill/hydra-firefox/body) 102 | ;; 103 | ;; (exwm-input-set-key (kbd "C-c p") 'jparcill/hydra-window-nav/body) 104 | 105 | ;; (defun jparcill/tmp-screenshot () 106 | ;; (interactive) 107 | ;; (start-process-shell-command "screenshot" "screenshot" (format-time-string "scrot -s /tmp/%Y-%m-%d-%H:%M:%S.png")) 108 | ;; ) 109 | ;; ;; C-c l will be for linux shortcuts 110 | ;; (exwm-input-set-key (kbd "C-c g") 'counsel-search) 111 | ;; (exwm-input-set-key (kbd "C-c l s") 'jparcill/tmp-screenshot) 112 | ;; 113 | ;; 114 | ;; (load! "~/.doom.d/machine_specific/exwm-conf.el") 115 | ;; (exwm-config-personal) 116 | ;; (exwm-enable) 117 | ;; ) 118 | 119 | ;; (use-package! exwm-firefox 120 | ;; :after exwm 121 | ;; :config 122 | ;; (exwm-firefox-mode) 123 | ;; ) 124 | ;; 125 | ;; (use-package! exwm-edit 126 | ;; :after exwm 127 | ;; ) 128 | ;; 129 | (use-package! mathpix.el 130 | :config 131 | (jparcill/mathpix-settings) 132 | (setq mathpix-screenshot-method "scrot -s %s") 133 | :bind 134 | ("C-c l m" . mathpix-screenshot) 135 | ) 136 | 137 | 138 | (add-hook! 'exwm-edit-compose-hook (lambda () (funcall 'markdown-mode))) 139 | 140 | (setq async-shell-command-buffer 'new-buffer) 141 | 142 | 143 | ;;(start-process-shell-command "jparcill-startup" "jparcill-startup" "sh ~/.doom.d/machine_specific/startup.sh") 144 | 145 | ;;(add-hook! 'exwm-exit-hook (lambda () (kill-buffer "jparcill-startup"))) 146 | -------------------------------------------------------------------------------- /custom_packages/org-krita-0.1.1/org-krita.el: -------------------------------------------------------------------------------- 1 | ;;; org-krita.el --- Krita support for Org Mode -*- lexical-binding: t; -*- 2 | 3 | ;; Copyright (c) 2020 Abhinav Tushar 4 | 5 | ;; Author: Abhinav Tushar 6 | ;; Version: 0.1.1 7 | ;; Package-Requires: ((emacs "26") (f "0.20.0")) 8 | ;; URL: https://github.com/lepisma/org-krita 9 | 10 | ;;; Commentary: 11 | 12 | ;; Krita support for Org Mode 13 | ;; This file is not a part of GNU Emacs. 14 | 15 | ;;; License: 16 | 17 | ;; This program is free software: you can redistribute it and/or modify 18 | ;; it under the terms of the GNU General Public License as published by 19 | ;; the Free Software Foundation, either version 3 of the License, or 20 | ;; (at your option) any later version. 21 | 22 | ;; This program is distributed in the hope that it will be useful, 23 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | ;; GNU General Public License for more details. 26 | 27 | ;; You should have received a copy of the GNU General Public License 28 | ;; along with this program. If not, see . 29 | 30 | ;;; Code: 31 | 32 | (require 'arc-mode) 33 | (require 'filenotify) 34 | (require 'f) 35 | (require 'cl-lib) 36 | (require 'org) 37 | 38 | (org-add-link-type "krita" #'org-krita-edit #'org-krita-export) 39 | 40 | ;; NOTE: Only single reference for a file supported as of now. 41 | 42 | (defvar-local org-krita-watchers nil 43 | "A-list mapping file names to change watcher descriptors.") 44 | 45 | (defvar-local org-krita-overlays nil 46 | "A-list mapping file names to overlay.") 47 | 48 | (defconst org-krita-dir (file-name-directory load-file-name) 49 | "Base directory for package.") 50 | 51 | (defun org-krita-resource (file) 52 | "Return full path of a resource FILE." 53 | (expand-file-name file (file-name-as-directory (concat org-krita-dir "resources")))) 54 | 55 | (defun org-krita-export (_path _desc _backend) 56 | (error "Krita export not implemented yet.")) 57 | 58 | (defun org-krita-make-new-image (output-kra-path &optional width height) 59 | "Create a new image based on a template at OUTPUT-KRA-PATH." 60 | (let ((template (org-krita-resource "template.kra"))) 61 | ;; TODO: Change image width and height based on provided argument 62 | (f-copy template output-kra-path))) 63 | 64 | (defun org-krita-extract-png (kra-path) 65 | "Extract png from given KRA-PATH and return data." 66 | (with-temp-buffer 67 | (set-buffer-multibyte nil) 68 | (archive-zip-extract kra-path "mergedimage.png") 69 | (buffer-string))) 70 | 71 | (defun org-krita-get-links () 72 | (org-element-map (org-element-parse-buffer) 'link 73 | (lambda (link) 74 | (when (string-equal (org-element-property :type link) "krita") 75 | link)))) 76 | 77 | (defun org-krita-event-file-path (event) 78 | (if (eq (nth 1 event) 'renamed) 79 | (nth 3 event) 80 | (nth 2 event))) 81 | 82 | (defun org-krita-watcher-callback (event) 83 | "Callback that runs after krita files are modified." 84 | (let* ((kra-path (org-krita-event-file-path event)) 85 | (links (org-krita-get-links)) 86 | (paths (mapcar (lambda (it) (expand-file-name (org-element-property :path it))) links)) 87 | (idx (cl-position kra-path paths :test #'string-equal))) 88 | (when idx (org-krita-show-link (nth idx links))))) 89 | 90 | (defun org-krita-add-watcher (kra-path) 91 | "Setup auto-refreshing watcher for given krita LINK." 92 | (let ((desc (file-notify-add-watch kra-path '(change) #'org-krita-watcher-callback))) 93 | (unless (alist-get kra-path org-krita-watchers nil nil #'string-equal) 94 | (push (cons kra-path desc) org-krita-watchers)))) 95 | 96 | (defun org-krita-edit (png-path &optional full-mode) 97 | "Edit given PNG-PATH in krita canvasonly mode. 98 | 99 | If FULL-MODE is not null, run full krita." 100 | (let ((kra-path (expand-file-name (f-swap-ext png-path "kra")))) 101 | (when (f-exists-p kra-path) 102 | (if full-mode 103 | (call-process "krita" nil 0 nil kra-path) 104 | (call-process "krita" nil 0 nil "--canvasonly" "--nosplash" kra-path)) 105 | (org-krita-add-watcher kra-path)))) 106 | 107 | (defun org-krita-hide-link (link) 108 | (let ((overlay (alist-get (org-element-property :path link) org-krita-overlays nil nil #'string-equal))) 109 | (when overlay (delete-overlay overlay)))) 110 | 111 | (defun org-krita-show-link (link) 112 | (org-krita-hide-link link) 113 | (let* ((start (org-element-property :begin link)) 114 | (end (org-element-property :end link)) 115 | (overlay (make-overlay start end)) 116 | (kra-path (org-element-property :path link))) 117 | (overlay-put overlay 'display (create-image (org-krita-extract-png kra-path) 'png t)) 118 | (push (cons kra-path overlay) org-krita-overlays))) 119 | 120 | (defun org-krita-hide-all () 121 | (dolist (link (org-krita-get-links)) 122 | (org-krita-hide-link link))) 123 | 124 | (defun org-krita-enable () 125 | (dolist (link (org-krita-get-links)) 126 | (org-krita-show-link link))) 127 | 128 | (defun org-krita-disable () 129 | "Disable watchers and hide krita images." 130 | (dolist (watcher org-krita-watchers) 131 | (file-notify-rm-watch (cdr watcher))) 132 | (setq org-krita-watchers nil) 133 | (org-krita-hide-all)) 134 | 135 | ;;;###autoload 136 | (defun org-krita-insert-new-image (output-kra-path link-name) 137 | "Insert new image in current buffer." 138 | (interactive "F\nsLink Name: ") 139 | (org-krita-make-new-image output-kra-path) 140 | (org-insert-link nil (concat "krita:" output-kra-path) link-name) 141 | ;; TODO: Enable only the new image 142 | (org-krita-enable)) 143 | 144 | ;;;###autoload 145 | (define-minor-mode org-krita-mode 146 | "Mode for displaying editable krita images within Org file." 147 | :initial-value nil 148 | (if org-krita-mode (org-krita-enable) (org-krita-disable))) 149 | 150 | (provide 'org-krita) 151 | 152 | ;;; org-krita.el ends here 153 | -------------------------------------------------------------------------------- /custom_packages/scimax-inkscape.el: -------------------------------------------------------------------------------- 1 | ;;; scimax-inkscape.el --- Using inkscape in org-mode 2 | 3 | ;;; Commentary: 4 | ;; 5 | ;; This library provides a new org-mode link for inkscape svg files. When you 6 | ;; click on an inkscape link, it will open the figure in inkscape. A thumbnail 7 | ;; image will be placed on the inkscape link. 8 | ;; 9 | ;; Export to HTML: 10 | ;; (browse-url (let ((org-export-before-processing-hook '(scimax-inkscape-preprocess))) 11 | ;; (org-html-export-to-html))) 12 | ;; 13 | ;; (org-open-file (let ((org-export-before-processing-hook '(scimax-inkscape-preprocess))) 14 | ;; (org-latex-export-to-pdf))) 15 | ;; 16 | ;; inkscape does not allow you to create empty files. We save the template in a 17 | ;; variable and create them on demand. 18 | 19 | (defcustom scimax-inkscape-thumbnail-width 300 20 | "Width of thumbnails in pts." 21 | :group 'scimax-inkscape) 22 | 23 | (defcustom scimax-inkscape-template-svg 24 | " 25 | 26 | 27 | 42 | 44 | 68 | 70 | 71 | 73 | image/svg+xml 74 | 76 | 77 | 78 | 79 | 80 | 85 | 86 | " 87 | "Blank document for inkscape. You cannot create a file at the 88 | command line, so we put this template in and open it. This one works for Inkscape 0.92.2") 89 | 90 | 91 | (defun scimax-inkscape-open (path) 92 | "Open the PATH in inkscape. 93 | Make a new file if needed." 94 | (interactive) 95 | (unless (f-ext-p path "svg") (error "Must be an svg file.")) 96 | (unless (file-exists-p path) 97 | (with-temp-file path 98 | (insert scimax-inkscape-template-svg))) 99 | (let ((display-buffer-alist '(("*Async Shell Command*" . (display-buffer-no-window . ()))))) 100 | (shell-command (format "inkscape %s &" path)))) 101 | 102 | 103 | (defun scimax-inkscape-thumbnail (start end path bracketp) 104 | "Put a thumbnail on an inkscape link." 105 | (let (img ov) 106 | (when (and 107 | ;; got a path 108 | path 109 | ;; it is an image 110 | (org-string-match-p (image-file-name-regexp) path) 111 | ;; and it exists 112 | (f-exists? path) 113 | ;; and there is no overlay here. 114 | (not (ov-at start))) 115 | (setq img (create-image 116 | (expand-file-name path) 117 | 'imagemagick nil :width scimax-inkscape-thumbnail-width 118 | :background "lightgray")) 119 | (setq ov (make-overlay start end)) 120 | (overlay-put ov 'display img) 121 | (overlay-put ov 'face 'default) 122 | ;; (overlay-put ov 'before-string "inkscape:") 123 | (overlay-put ov 'org-image-overlay t) 124 | (overlay-put ov 'modification-hooks 125 | (list 126 | `(lambda (&rest args) 127 | (org-display-inline-remove-overlay ,ov t ,start ,end)))) 128 | (push ov org-inline-image-overlays)))) 129 | 130 | 131 | (defun scimax-inkscape-redraw-thumbnails (&rest args) 132 | "Use font-lock to redraw the links." 133 | (with-current-buffer (or (buffer-base-buffer) (current-buffer)) 134 | (org-restart-font-lock))) 135 | 136 | ;; This gets the thumbnails to be redrawn with inline image toggling. 137 | (advice-add 'org-display-inline-images :after 'scimax-inkscape-redraw-thumbnails) 138 | 139 | 140 | (defun scimax-inkscape-preprocess (backend) 141 | "Preprocessing function to run in `org-export-before-processing-hook'. 142 | Here are two examples: 143 | 144 | (browse-url (let ((org-export-before-processing-hook '(scimax-inkscape-preprocess))) 145 | (org-html-export-to-html))) 146 | 147 | (org-open-file (let ((org-export-before-processing-hook '(scimax-inkscape-preprocess))) 148 | (org-latex-export-to-pdf)))" 149 | (let ((links (reverse (org-element-map (org-element-parse-buffer) 'link 150 | (lambda (link) 151 | (when (string= (org-element-property :type link) "inkscape") 152 | link)))))) 153 | (cl-loop for link in links 154 | do 155 | (goto-char (org-element-property :begin link)) 156 | (re-search-forward "inkscape:" (org-element-property :end link)) 157 | (replace-match "file:")))) 158 | 159 | 160 | (org-link-set-parameters 161 | "inkscape" 162 | :follow 'scimax-inkscape-open 163 | :help-echo "Click to open in inkscape." 164 | :activate-func 'scimax-inkscape-thumbnail 165 | :export (lambda (path desc backend) 166 | ;; You need to use the `scimax-inkscape-preprocess' function in a hook for 167 | ;; more advanced export options like captions. 168 | (cond 169 | ((eq 'latex backend) 170 | (format "\\includesvg{%s}" path)) 171 | ((eq 'html backend) 172 | (format " no scaling 60 | ;;(set-face-attribute 'org-level-7 nil :inherit 'org-level-8) 61 | ;;(set-face-attribute 'org-level-6 nil :inherit 'org-level-8) 62 | ;;(set-face-attribute 'org-level-5 nil :inherit 'org-level-8) 63 | ;;(set-face-attribute 'org-level-4 nil :inherit 'org-level-8) 64 | ;;;; Top ones get scaled the same as in LaTeX (\large, \Large, \LARGE) 65 | ;;(set-face-attribute 'org-level-3 nil :inherit 'org-level-8 :height 1.2) ;\large 66 | ;;(set-face-attribute 'org-level-2 nil :inherit 'org-level-8 :height 1.44) ;\Large 67 | ;;(set-face-attribute 'org-level-1 nil :inherit 'org-level-8 :height 1.728) ;\LARGE 68 | ;;;; Only use the first 4 styles and do not cycle. 69 | ;;(setq org-cycle-level-faces nil) 70 | ;;(setq org-n-level-faces 4) 71 | 72 | 73 | ;;(setq org-superstar-item-bullet-alist 74 | ;; '((?+ . ?🌹) 75 | ;; (?* . ?🌻) 76 | ;; (?- . ?🌼))) 77 | 78 | (setq org-capture-templates 79 | `( 80 | ("t" "Todo" entry (file ,(concat org-file-path "phone_folder/personal.org")) 81 | "* TODO %? \n%U" :empty-lines 1) 82 | ("d" "Todo deadline" entry (file ,(concat org-file-path "phone_folder/personal.org")) 83 | "* TODO %? \nDEADLINE: %^T\n%U" :empty-lines 1) 84 | ("w" "Wait deadline" entry (file ,(concat org-file-path "phone_folder/personal.org")) 85 | "* WAIT %? \nDEADLINE: %^T\n%U" :empty-lines 1) 86 | ("r" "Reading List" entry (file+olp ,(concat org-file-path "phone_folder/reading_list.org") "Catchall") 87 | "* RD %? \n%U" :empty-lines 1) 88 | ("s" "Someday" entry (file+olp ,(concat org-file-path "phone_folder/someday.org") "Catchall") 89 | "* SOMEDAY %? \n%U" :empty-lines 1) 90 | ("e" "Event" entry (file ,(concat org-file-path "phone_folder/personal.org")) 91 | "* %? \nSCHEDULED: %^T\n%U" :empty-lines 1) 92 | ("j" "Journal entry" entry (function jparcill/org-journal-find-location) 93 | "* NEXT %?\n%U" :empty-lines 1) 94 | ("k" "Journal sched entry" entry (function jparcill/org-journal-find-location) 95 | "* %? %^T\n%U" :empty-lines 1) 96 | ("m" "Morning Journal entry" entry (function jparcill/org-journal-find-location) 97 | "* Morning Entry 98 | ** Checklist 99 | - [[https://www.youtube.com/watch?v=GADW8Nlnc1s]] 100 | - [ ] Put on this week's album 101 | - [ ] make bed meditatively and clean (5 min) 102 | - [ ] Bruxism, Workout, Ergonomic stretch (5 min) 103 | - [ ] Yesterday's journal if not done (5 min) 104 | - [ ] Review whole month, and agenda TODOs (5 min) 105 | - [ ] Refresh phone orgzly 106 | ** Looking Forward To %? 107 | ** Day Plan 108 | ** Determinations :determ:" :empty-lines 1) 109 | ("n" "Night Journal entry" entry (function jparcill/org-journal-find-location) 110 | "* Today's Learnings\n* My Day\n%U") 111 | )) 112 | 113 | 114 | ;; Org Journal 115 | (defun jparcill/org-journal-find-location () 116 | ;; Open today's journal, but specify a non-nil prefix argument in order to 117 | ;; inhibit inserting the heading; org-capture will insert the heading. 118 | (org-journal-new-entry t) 119 | ;; Position point on the journal's top-level heading so that org-capture 120 | ;; will add the new entry as a child entry. 121 | (goto-char (point-min))) 122 | 123 | 124 | (set-face-attribute 'org-table nil :inherit 'fixed-pitch) 125 | 126 | (set-face-attribute 'org-block nil :inherit 'fixed-pitch) 127 | 128 | ;; Refile taken from here: https://www.reddit.com/r/emacs/comments/4366f9/how_do_orgrefiletargets_work/ 129 | ;;(setq org-refile-targets '((nil :maxlevel . 9) 130 | ;; (org-agenda-files :maxlevel . 9))) 131 | ;;(setq org-outline-path-complete-in-steps nil) ; Refile in a single go 132 | ;;(setq org-refile-use-outline-path t) ; Show full paths for refiling 133 | ;;(setq org-refile-allow-creating-parent-nodes (quote confirm)) 134 | (setq org-pretty-entities t) 135 | 136 | (setq org-hide-emphasis-markers t) 137 | (setq org-fontify-whole-heading-line t) 138 | (setq org-fontify-done-headline t) 139 | (setq org-fontify-quote-and-verse-blocks t) 140 | (setq org-tags-column 0) 141 | (setq org-src-fontify-natively t) 142 | (setq org-edit-src-content-indentation 0) 143 | (setq org-src-tab-acts-natively t) 144 | (setq org-src-preserve-indentation t) 145 | 146 | (setq org-list-demote-modify-bullet '(("+" . "-") ("-" . "+") ("*" . "+") ("1." . "a."))) 147 | 148 | (setq org-log-done 'time) 149 | -------------------------------------------------------------------------------- /themes/blonde-theme.el: -------------------------------------------------------------------------------- 1 | ;;; themes/blonde-theme.el -*- lexical-binding: t; -*- 2 | 3 | 4 | (require 'doom-themes) 5 | ;; 6 | ;;TODO Make sure the 256 and 16 are correct 7 | ;;Yellow needs to be changed 8 | ;;magenta highlighting in ivy looks completely ugly 9 | ;; violet needs to be changed for tables 10 | (defgroup blonde-theme nil 11 | "Options for doom-themes." 12 | :group 'doom-themes) 13 | 14 | (defcustom blonde-brighter-modeline nil 15 | "If non-nil, more vivid colors will be used to style the mode-line." 16 | :group 'blonde-theme 17 | :type 'boolean) 18 | 19 | (defcustom blonde-brighter-comments nil 20 | "If non-nil, comments will be highlighted in more vivid colors." 21 | :group 'blonde-theme 22 | :type 'boolean) 23 | 24 | (defcustom blonde-comment-bg blonde-brighter-comments 25 | "If non-nil, comments will have a subtle, darker background. Enhancing their 26 | legibility." 27 | :group 'blonde-theme 28 | :type 'boolean) 29 | 30 | (defcustom blonde-padded-modeline doom-themes-padded-modeline 31 | "If non-nil, adds a 4px padding to the mode-line. Can be an integer to 32 | determine the exact padding." 33 | :group 'blonde-theme 34 | :type '(choice integer boolean)) 35 | 36 | ;; 37 | (def-doom-theme blonde 38 | "A theme inspired by Blonde" 39 | 40 | ;; name default 256 16 41 | ((bg '("#f9f9f9" nil nil )) 42 | (bg-alt '("#f9f9f9" nil nil )) 43 | (base0 '("#e0e0e0" "black" "black" )) 44 | (base1 '("#cccccc" "#1e1e1e" "brightblack" )) 45 | (base2 '("#adadad" "#2e2e2e" "brightblack" )) 46 | (base3 '("#999999" "#262626" "brightblack" )) 47 | (base4 '("#8f8f8f" "#3f3f3f" "brightblack" )) 48 | (base5 '("#7a7a7a" "#525252" "brightblack" )) 49 | (base6 '("#7b7070" "#6b6b6b" "brightblack" )) 50 | (base7 '("#5c5c5c" "#979797" "brightblack" )) 51 | (base8 '("#474747" "#dfdfdf" "white" )) 52 | (fg-alt '("#688D5D" "#2d2d2d" "white" )) 53 | (fg '("#688D5D" "#bfbfbf" "brightwhite" )) 54 | 55 | (grey '("#498caf" "#515154" "brightblack" )) 56 | (red '("#E80000" "#a1687b" "red" )) 57 | (orange '("#EE8700" "#E6C000" "brightred" )) 58 | (green '("#688d5d" "#C2FFDF" "green" )) 59 | (yellow '("#f9c80e" "#f9e10a" "yellow" )) 60 | (blue '("#0000ED" "#bee3e1" "brightblue" )) 61 | (teal '("#47bed2" "#47bed2" "brightgreen" )) 62 | (dark-blue '("#1244c6" "#1244c6" "blue" )) 63 | (magenta '("#EB00EC" "#c45385" "magenta" )) 64 | (violet '("#DEC0F1" "#C5A3FF" "brightmagenta")) 65 | (cyan '("#73e8dc" "#C2FFDF" "brightcyan" )) 66 | (dark-cyan '("#204052" "#204052" "cyan" )) 67 | 68 | ;; face categories -- required for all themes 69 | (highlight green) 70 | (vertical-bar base0) 71 | (selection teal) 72 | (builtin blue) 73 | (comments (if blonde-brighter-comments base8 base6)) 74 | (doc-comments base7) 75 | (constants magenta) 76 | (functions red) 77 | (keywords magenta) 78 | (methods orange) 79 | (operators magenta) 80 | (type blue) 81 | (strings orange) 82 | (variables red) 83 | (numbers magenta) 84 | (region base0) 85 | (error red) 86 | (warning yellow) 87 | (success green) 88 | (vc-modified magenta) 89 | (vc-added green) 90 | (vc-deleted red) 91 | 92 | ;; custom categories 93 | (hidden `(,(car bg) "black" "black")) 94 | (-modeline-bright blonde-brighter-modeline) 95 | (-modeline-pad 96 | (when blonde-padded-modeline 97 | (if (integerp blonde-padded-modeline) blonde-padded-modeline 4))) 98 | 99 | (modeline-fg nil) 100 | (modeline-fg-alt base8) 101 | 102 | (modeline-bg 103 | (if -modeline-bright 104 | base3 105 | `(,(doom-darken (car bg) 0.15) ,@(cdr base2)))) 106 | (modeline-bg-l 107 | (if -modeline-bright 108 | base3 109 | `(,(doom-darken (car bg) 0.1) ,@(cdr base2)))) 110 | (modeline-bg-inactive (doom-darken bg 0.01)) 111 | (modeline-bg-inactive-l `(,(car bg) ,@(cdr base1)))) 112 | 113 | 114 | ;; --- extra faces ------------------------ 115 | ( 116 | (company-tooltip-selection :background base3) 117 | (elscreen-tab-other-screen-face :background "#353a42" :foreground "#1e2022") 118 | 119 | ((line-number &override) :foreground fg) 120 | ((line-number-current-line &override) :foreground fg) 121 | 122 | (font-lock-comment-face 123 | :foreground comments 124 | :background (if blonde-comment-bg base4)) 125 | (font-lock-doc-face 126 | :inherit 'font-lock-comment-face 127 | :foreground doc-comments) 128 | (font-lock-keyword-face 129 | :slant 'italic 130 | :foreground keywords) 131 | 132 | ;; Centaur tabs 133 | (centaur-tabs-active-bar-face :background blue) 134 | (centaur-tabs-modified-marker-selected :inherit 'centaur-tabs-selected 135 | :foreground blue) 136 | (centaur-tabs-modified-marker-unselected :inherit 'centaur-tabs-unselected 137 | :foreground blue) 138 | ;; Doom modeline 139 | (doom-modeline-bar :background blue) 140 | 141 | ;; highlight-thing highlight-symbol 142 | (highlight-symbol-face :background region :distant-foreground fg-alt) 143 | 144 | ;; highlight-thing 145 | (highlight-thing :background region :distant-foreground fg-alt) 146 | 147 | ;; hl-line 148 | (hl-line :background base0) 149 | 150 | (mode-line 151 | :background modeline-bg :foreground modeline-fg 152 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg))) 153 | (mode-line-inactive 154 | :background modeline-bg-inactive :foreground modeline-fg-alt 155 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive))) 156 | (mode-line-emphasis 157 | :foreground (if -modeline-bright cyan highlight)) 158 | 159 | (solaire-mode-line-face 160 | :inherit 'mode-line 161 | :background modeline-bg-l 162 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-l))) 163 | (solaire-mode-line-inactive-face 164 | :inherit 'mode-line-inactive 165 | :background modeline-bg-inactive-l 166 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive-l))) 167 | 168 | (tooltip :background bg-alt :foreground fg) 169 | ;; --- major-mode faces ------------------- 170 | ;; css-mode / scss-mode 171 | (css-proprietary-property :foreground magenta) 172 | (css-property :foreground green) 173 | (css-selector :foreground blue) 174 | 175 | ;; markdown-mode 176 | (markdown-markup-face :foreground base5) 177 | (markdown-header-face :inherit 'bold :foreground red) 178 | (markdown-url-face :foreground teal :weight 'normal) 179 | (markdown-reference-face :foreground base6) 180 | ((markdown-bold-face &override) :foreground fg) 181 | ((markdown-italic-face &override) :foreground fg-alt) 182 | 183 | ;; magit 184 | (magit-diff-removed :foreground (doom-darken red 0.2) :background (doom-blend red base5 0.1)) 185 | (magit-diff-removed-highlight :foreground red :background (doom-blend red base5 0.2) :weight 'bold) 186 | 187 | ;; outline (affects org-mode) 188 | ((outline-1 &override) :foreground base8) 189 | ((outline-2 &override) :foreground base7) 190 | ((outline-3 &override) :foreground base5) 191 | ((outline-4 &override) :foreground base4) 192 | ((outline-5 &override) :foreground base8) 193 | ((outline-6 &override) :foreground base7) 194 | ((outline-7 &override) :foreground base5) 195 | ((outline-8 &override) :foreground base4) 196 | 197 | ;; org-mode 198 | ((org-block &override) :background bg) 199 | ((org-block-begin-line &override) :background bg) 200 | (org-scheduled :foreground green) 201 | (org-scheduled-previously :foreground red) 202 | (org-scheduled-today :foreground orange) 203 | (org-hide :foreground hidden)) 204 | 205 | ;; --- extra variables --------------------- 206 | ;; () 207 | ) 208 | 209 | ;;; blonde-theme.el ends here 210 | -------------------------------------------------------------------------------- /themes/doom-wonder-egg-green-theme.el: -------------------------------------------------------------------------------- 1 | ;;; doom-wonder-egg-green-theme.el -*- no-byte-compile: t; -*- 2 | (require 'doom-themes) 3 | ;; 4 | ;;TODO Make sure the 256 and 16 are correct 5 | ;; 6 | (defgroup doom-wonder-egg-green-theme nil 7 | "Options for doom-themes." 8 | :group 'doom-themes) 9 | 10 | (defcustom doom-wonder-egg-green-brighter-modeline nil 11 | "If non-nil, more vivid colors will be used to style the mode-line." 12 | :group 'doom-wonder-egg-green-theme 13 | :type 'boolean) 14 | 15 | (defcustom doom-wonder-egg-green-brighter-comments nil 16 | "If non-nil, comments will be highlighted in more vivid colors." 17 | :group 'doom-wonder-egg-green-theme 18 | :type 'boolean) 19 | 20 | (defcustom doom-wonder-egg-green-comment-bg doom-wonder-egg-green-brighter-comments 21 | "If non-nil, comments will have a subtle, darker background. Enhancing their 22 | legibility." 23 | :group 'doom-wonder-egg-green-theme 24 | :type 'boolean) 25 | 26 | (defcustom doom-wonder-egg-green-padded-modeline doom-themes-padded-modeline 27 | "If non-nil, adds a 4px padding to the mode-line. Can be an integer to 28 | determine the exact padding." 29 | :group 'doom-wonder-egg-green-theme 30 | :type '(choice integer boolean)) 31 | 32 | ;; 33 | (def-doom-theme doom-wonder-egg-green 34 | "A theme inspired by Wonder Egg Priority" 35 | 36 | ;; name default 256 16 37 | ((bg '("#2c6b34" nil nil )) 38 | (bg-alt '("#a7f2c5" nil nil )) 39 | (base0 '("#1e385c" "black" "black" )) 40 | (base1 '("#284b7b" "#1e1e1e" "brightblack" )) 41 | (base2 '("#325d9a" "#2e2e2e" "brightblack" )) 42 | (base3 '("#3c70b9" "#262626" "brightblack" )) 43 | (base4 '("#5685c8" "#3f3f3f" "brightblack" )) 44 | (base5 '("#749bd2" "#525252" "brightblack" )) 45 | (base6 '("#93b2dc" "#6b6b6b" "brightblack" )) 46 | (base7 '("#b2c8e6" "#979797" "brightblack" )) 47 | (base8 '("#d1def0" "#dfdfdf" "white" )) 48 | (fg-alt '("#d1def0" "#2d2d2d" "white" )) 49 | (fg '("#f3efe0" "#bfbfbf" "brightwhite" )) 50 | 51 | (grey '("#498caf" "#515154" "brightblack" )) 52 | (red '("#fc7f6c" "#a1687b" "red" )) 53 | (orange '("#f9ae3e" "#E6C000" "brightred" )) 54 | (green '("#cef98d" "#C2FFDF" "green" )) 55 | (yellow '("#f9e10a" "#f9e10a" "yellow" )) 56 | (alt-yellow '("#fcf29c" "#f9e10a" "yellow" )) 57 | (blue '("#bee3e1" "#bee3e1" "brightblue" )) 58 | (teal '("#47bed2" "#47bed2" "brightgreen" )) 59 | (dark-blue '("#1244c6" "#1244c6" "blue" )) 60 | (magenta '("#f9b6c6" "#c45385" "magenta" )) 61 | (violet '("#DEC0F1" "#C5A3FF" "brightmagenta")) 62 | (cyan '("#73e8dc" "#C2FFDF" "brightcyan" )) 63 | (dark-cyan '("#204052" "#204052" "cyan" )) 64 | 65 | ;; face categories -- required for all themes 66 | (highlight yellow) 67 | (vertical-bar (doom-darken base6 0.5)) 68 | (selection teal) 69 | (builtin blue) 70 | (comments (if doom-wonder-egg-green-brighter-comments base8 base6)) 71 | (doc-comments base7) 72 | (constants magenta) 73 | (functions yellow) 74 | (keywords blue) 75 | (methods yellow) 76 | (operators violet) 77 | (type blue) 78 | (strings alt-yellow) 79 | (variables blue) 80 | (numbers magenta) 81 | (region base3) 82 | (error red) 83 | (warning yellow) 84 | (success green) 85 | (vc-modified violet) 86 | (vc-added green) 87 | (vc-deleted red) 88 | 89 | ;; custom categories 90 | (hidden `(,(car bg) "black" "black")) 91 | (-modeline-bright doom-wonder-egg-green-brighter-modeline) 92 | (-modeline-pad 93 | (when doom-wonder-egg-green-padded-modeline 94 | (if (integerp doom-wonder-egg-green-padded-modeline) doom-wonder-egg-green-padded-modeline 4))) 95 | 96 | (modeline-fg nil) 97 | (modeline-fg-alt base8) 98 | 99 | (modeline-bg 100 | (if -modeline-bright 101 | base3 102 | `(,(doom-darken (car bg) 0.15) ,@(cdr base2)))) 103 | (modeline-bg-l 104 | (if -modeline-bright 105 | base3 106 | `(,(doom-darken (car bg) 0.1) ,@(cdr base2)))) 107 | (modeline-bg-inactive (doom-darken bg 0.01)) 108 | (modeline-bg-inactive-l `(,(car bg) ,@(cdr base1)))) 109 | 110 | 111 | ;; --- extra faces ------------------------ 112 | ( 113 | (company-tooltip-selection :background base3) 114 | (elscreen-tab-other-screen-face :background "#353a42" :foreground "#1e2022") 115 | 116 | ((line-number &override) :foreground fg) 117 | ((line-number-current-line &override) :foreground fg) 118 | 119 | (font-lock-comment-face 120 | :foreground comments 121 | :background (if doom-wonder-egg-green-comment-bg base4)) 122 | (font-lock-doc-face 123 | :inherit 'font-lock-comment-face 124 | :foreground doc-comments) 125 | (font-lock-keyword-face 126 | :slant 'italic 127 | :foreground keywords) 128 | 129 | ;; Centaur tabs 130 | (centaur-tabs-active-bar-face :background blue) 131 | (centaur-tabs-modified-marker-selected :inherit 'centaur-tabs-selected 132 | :foreground blue) 133 | (centaur-tabs-modified-marker-unselected :inherit 'centaur-tabs-unselected 134 | :foreground blue) 135 | ;; Doom modeline 136 | (doom-modeline-bar :background blue) 137 | 138 | ;; highlight-thing highlight-symbol 139 | (highlight-symbol-face :background region :distant-foreground fg-alt) 140 | 141 | ;; highlight-thing 142 | (highlight-thing :background region :distant-foreground fg-alt) 143 | 144 | ;; hl-line 145 | ;;(hl-line :background blue) 146 | (hl-line :background base3) 147 | 148 | (mode-line 149 | :background modeline-bg :foreground modeline-fg 150 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg))) 151 | (mode-line-inactive 152 | :background modeline-bg-inactive :foreground modeline-fg-alt 153 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive))) 154 | (mode-line-emphasis 155 | :foreground (if -modeline-bright cyan highlight)) 156 | 157 | (solaire-mode-line-face 158 | :inherit 'mode-line 159 | :background modeline-bg-l 160 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-l))) 161 | (solaire-mode-line-inactive-face 162 | :inherit 'mode-line-inactive 163 | :background modeline-bg-inactive-l 164 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive-l))) 165 | 166 | (tooltip :background bg-alt :foreground fg) 167 | ;; --- major-mode faces ------------------- 168 | ;; css-mode / scss-mode 169 | (css-proprietary-property :foreground violet) 170 | (css-property :foreground green) 171 | (css-selector :foreground blue) 172 | 173 | ;; markdown-mode 174 | (markdown-markup-face :foreground base5) 175 | (markdown-header-face :inherit 'bold :foreground red) 176 | (markdown-url-face :foreground teal :weight 'normal) 177 | (markdown-reference-face :foreground base6) 178 | ((markdown-bold-face &override) :foreground fg) 179 | ((markdown-italic-face &override) :foreground fg-alt) 180 | 181 | ;; magit 182 | (magit-diff-removed :foreground (doom-darken red 0.2) :background (doom-blend red base5 0.1)) 183 | (magit-diff-removed-highlight :foreground red :background (doom-blend red base5 0.2) :weight 'bold) 184 | 185 | ;; outline (affects org-mode) 186 | ((outline-1 &override) :foreground magenta) 187 | ((outline-2 &override) :foreground blue) 188 | ((outline-3 &override) :foreground alt-yellow) 189 | ((outline-4 &override) :foreground magenta) 190 | ((outline-5 &override) :foreground blue) 191 | ((outline-6 &override) :foreground alt-yellow) 192 | ((outline-7 &override) :foreground magenta) 193 | ((outline-8 &override) :foreground blue) 194 | 195 | ;; org-mode 196 | ((org-block &override) :background base4) 197 | ((org-block-begin-line &override) :background base4) 198 | (org-scheduled :foreground green) 199 | (org-scheduled-previously :foreground red) 200 | (org-scheduled-today :foreground orange) 201 | (org-hide :foreground hidden)) 202 | 203 | ;; --- extra variables --------------------- 204 | ;; () 205 | ) 206 | 207 | ;;; doom-wonder-egg-green-theme.el ends here 208 | -------------------------------------------------------------------------------- /themes/doom-wonder-egg-theme.el: -------------------------------------------------------------------------------- 1 | ;;; doom-wonder-egg-theme.el -*- no-byte-compile: t; -*- 2 | (require 'doom-themes) 3 | ;; 4 | ;;TODO Make sure the 256 and 16 are correct 5 | ;; 6 | (defgroup doom-wonder-egg-theme nil 7 | "Options for doom-themes." 8 | :group 'doom-themes) 9 | 10 | (defcustom doom-wonder-egg-brighter-modeline nil 11 | "If non-nil, more vivid colors will be used to style the mode-line." 12 | :group 'doom-wonder-egg-theme 13 | :type 'boolean) 14 | 15 | (defcustom doom-wonder-egg-brighter-comments nil 16 | "If non-nil, comments will be highlighted in more vivid colors." 17 | :group 'doom-wonder-egg-theme 18 | :type 'boolean) 19 | 20 | (defcustom doom-wonder-egg-comment-bg doom-wonder-egg-brighter-comments 21 | "If non-nil, comments will have a subtle, darker background. Enhancing their 22 | legibility." 23 | :group 'doom-wonder-egg-theme 24 | :type 'boolean) 25 | 26 | (defcustom doom-wonder-egg-padded-modeline doom-themes-padded-modeline 27 | "If non-nil, adds a 4px padding to the mode-line. Can be an integer to 28 | determine the exact padding." 29 | :group 'doom-wonder-egg-theme 30 | :type '(choice integer boolean)) 31 | 32 | ;; 33 | (def-doom-theme doom-wonder-egg 34 | "A theme inspired by Wonder Egg Priority" 35 | 36 | ;; name default 256 16 37 | ((bg '("#2f98d2" nil nil )) 38 | (bg-alt '("#2c92c9" nil nil )) 39 | (base0 '("#1e385c" "black" "black" )) 40 | (base1 '("#284b7b" "#1e1e1e" "brightblack" )) 41 | (base2 '("#325d9a" "#2e2e2e" "brightblack" )) 42 | (base3 '("#3c70b9" "#262626" "brightblack" )) 43 | (base4 '("#5685c8" "#3f3f3f" "brightblack" )) 44 | (base5 '("#749bd2" "#525252" "brightblack" )) 45 | (base6 '("#93b2dc" "#6b6b6b" "brightblack" )) 46 | (base7 '("#b2c8e6" "#979797" "brightblack" )) 47 | (base8 '("#d1def0" "#dfdfdf" "white" )) 48 | (fg-alt '("#d1def0" "#2d2d2d" "white" )) 49 | (fg '("#f3efe0" "#bfbfbf" "brightwhite" )) 50 | 51 | (grey '("#498caf" "#515154" "brightblack" )) 52 | (red '("#fc7f6c" "#a1687b" "red" )) 53 | (orange '("#f9ae3e" "#E6C000" "brightred" )) 54 | (green '("#cef98d" "#C2FFDF" "green" )) 55 | (alt-green '("#a7f2c5" "#C2FFDF" "green" )) 56 | (dark-green '("#2c6b34" "#C2FFDF" "green" )) 57 | (yellow '("#f9e10a" "#f9e10a" "yellow" )) 58 | (alt-yellow '("#fcf29c" "#f9e10a" "yellow" )) 59 | (blue '("#bee3e1" "#bee3e1" "brightblue" )) 60 | (teal '("#47bed2" "#47bed2" "brightgreen" )) 61 | (dark-blue '("#1244c6" "#1244c6" "blue" )) 62 | (magenta '("#f9b6c6" "#c45385" "magenta" )) 63 | (violet '("#DEC0F1" "#C5A3FF" "brightmagenta")) 64 | (cyan '("#73e8dc" "#C2FFDF" "brightcyan" )) 65 | (dark-cyan '("#204052" "#204052" "cyan" )) 66 | 67 | ;; face categories -- required for all themes 68 | (highlight yellow) 69 | (vertical-bar (doom-darken base6 0.5)) 70 | (selection teal) 71 | (builtin blue) 72 | (comments (if doom-wonder-egg-brighter-comments base8 base6)) 73 | (doc-comments base7) 74 | (constants magenta) 75 | (functions yellow) 76 | (keywords alt-green) 77 | (methods yellow) 78 | (operators violet) 79 | (type alt-green) 80 | (strings alt-yellow) 81 | (variables alt-green) 82 | (numbers magenta) 83 | (region base3) 84 | (error red) 85 | (warning yellow) 86 | (success green) 87 | (vc-modified violet) 88 | (vc-added green) 89 | (vc-deleted red) 90 | 91 | ;; custom categories 92 | (hidden `(,(car bg) "black" "black")) 93 | (-modeline-bright doom-wonder-egg-brighter-modeline) 94 | (-modeline-pad 95 | (when doom-wonder-egg-padded-modeline 96 | (if (integerp doom-wonder-egg-padded-modeline) doom-wonder-egg-padded-modeline 4))) 97 | 98 | (modeline-fg nil) 99 | (modeline-fg-alt base8) 100 | 101 | (modeline-bg 102 | (if -modeline-bright 103 | base3 104 | `(,(doom-darken (car bg) 0.15) ,@(cdr base2)))) 105 | (modeline-bg-l 106 | (if -modeline-bright 107 | base3 108 | `(,(doom-darken (car bg) 0.1) ,@(cdr base2)))) 109 | (modeline-bg-inactive (doom-darken bg 0.01)) 110 | (modeline-bg-inactive-l `(,(car bg) ,@(cdr base1)))) 111 | 112 | 113 | ;; --- extra faces ------------------------ 114 | ( 115 | (company-tooltip-selection :background base3) 116 | (elscreen-tab-other-screen-face :background "#353a42" :foreground "#1e2022") 117 | 118 | ((line-number &override) :foreground fg) 119 | ((line-number-current-line &override) :foreground fg) 120 | 121 | (font-lock-comment-face 122 | :foreground comments 123 | :background (if doom-wonder-egg-comment-bg base4)) 124 | (font-lock-doc-face 125 | :inherit 'font-lock-comment-face 126 | :foreground doc-comments) 127 | (font-lock-keyword-face 128 | :slant 'italic 129 | :foreground keywords) 130 | 131 | ;; Centaur tabs 132 | (centaur-tabs-active-bar-face :background blue) 133 | (centaur-tabs-modified-marker-selected :inherit 'centaur-tabs-selected 134 | :foreground blue) 135 | (centaur-tabs-modified-marker-unselected :inherit 'centaur-tabs-unselected 136 | :foreground blue) 137 | ;; Doom modeline 138 | (doom-modeline-bar :background blue) 139 | 140 | ;; highlight-thing highlight-symbol 141 | (highlight-symbol-face :background region :distant-foreground fg-alt) 142 | 143 | ;; highlight-thing 144 | (highlight-thing :background region :distant-foreground fg-alt) 145 | 146 | ;; hl-line 147 | ;;(hl-line :background blue) 148 | (hl-line :background base3) 149 | 150 | (mode-line 151 | :background modeline-bg :foreground modeline-fg 152 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg))) 153 | (mode-line-inactive 154 | :background modeline-bg-inactive :foreground modeline-fg-alt 155 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive))) 156 | (mode-line-emphasis 157 | :foreground (if -modeline-bright cyan highlight)) 158 | 159 | (solaire-mode-line-face 160 | :inherit 'mode-line 161 | :background modeline-bg-l 162 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-l))) 163 | (solaire-mode-line-inactive-face 164 | :inherit 'mode-line-inactive 165 | :background modeline-bg-inactive-l 166 | :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive-l))) 167 | 168 | (tooltip :background bg-alt :foreground fg) 169 | ;; --- major-mode faces ------------------- 170 | ;; css-mode / scss-mode 171 | (css-proprietary-property :foreground violet) 172 | (css-property :foreground green) 173 | (css-selector :foreground blue) 174 | 175 | ;; markdown-mode 176 | (markdown-markup-face :foreground base5) 177 | (markdown-header-face :inherit 'bold :foreground red) 178 | (markdown-url-face :foreground teal :weight 'normal) 179 | (markdown-reference-face :foreground base6) 180 | ((markdown-bold-face &override) :foreground fg) 181 | ((markdown-italic-face &override) :foreground fg-alt) 182 | 183 | ;; magit 184 | (magit-diff-removed :foreground (doom-darken red 0.2) :background (doom-blend red base5 0.1)) 185 | (magit-diff-removed-highlight :foreground red :background (doom-blend red base5 0.2) :weight 'bold) 186 | 187 | ;; outline (affects org-mode) 188 | ((outline-1 &override) :foreground magenta) 189 | ((outline-2 &override) :foreground alt-green) 190 | ((outline-3 &override) :foreground alt-yellow) 191 | ((outline-4 &override) :foreground magenta) 192 | ((outline-5 &override) :foreground alt-green) 193 | ((outline-6 &override) :foreground alt-yellow) 194 | ((outline-7 &override) :foreground magenta) 195 | ((outline-8 &override) :foreground alt-green) 196 | 197 | ;; org-mode 198 | ((org-block &override) :background base4) 199 | ((org-block-begin-line &override) :background base4) 200 | (org-scheduled :foreground green) 201 | (org-scheduled-previously :foreground red) 202 | (org-scheduled-today :foreground orange) 203 | (org-hide :foreground hidden)) 204 | 205 | ;; --- extra variables --------------------- 206 | ;; () 207 | ) 208 | 209 | ;;; doom-wonder-egg-theme.el ends here 210 | -------------------------------------------------------------------------------- /config.el: -------------------------------------------------------------------------------- 1 | ;;; .doom.d/config.el -*- lexical-biding: t; -*- 2 | 3 | ;; DATE 4 | ;;[2019-11-26 Tue] 5 | ;; My own config functions 6 | 7 | ;; 8 | ;; Device Variables 9 | ;; ~~~~~~~~~~~~~~~~ 10 | 11 | 12 | 13 | ;; Private 14 | ;; -------- 15 | (load! "private.el") 16 | 17 | ;; Machine dependent-code 18 | ;; ---------------------- 19 | 20 | ;; Linux Specific 21 | (cond ((equal (string-trim (shell-command-to-string "hostname")) "jared-virtualbox") 22 | (load! "./machine_specific/linux_pc.el")) 23 | ((equal (string-trim (shell-command-to-string "hostname")) "jared-surface") 24 | (load! "./machine_specific/linux_pc.el")) 25 | ((equal (string-trim (shell-command-to-string "hostname")) "localhost") 26 | (load! "./machine_specific/phone.el")) 27 | ((equal (string-trim (shell-command-to-string "hostname")) "DESKTOP-6DMJC51") 28 | (load! "./machine_specific/windows_pc.el")) 29 | ((equal (string-trim (shell-command-to-string "hostname")) "jaredarcilla-macbookpro.local") 30 | (load! "./machine_specific/work_mac.el")) 31 | ) 32 | 33 | 34 | ;; Aesthetics 35 | ;; ----------- 36 | ;; Linum 37 | (setq display-line-numbers-type 'relative) 38 | 39 | ;;theme 40 | (setq doom-theme 'doom-rouge) 41 | 42 | ;; Taken from https://tecosaur.github.io/emacs-config/config.html 43 | (defun jparcill/doom-modeline-conditional-buffer-encoding () 44 | "We expect the encoding to be LF UTF-8, so only show the modeline when this is not the case" 45 | (setq-local doom-modeline-buffer-encoding 46 | (unless (or (eq buffer-file-coding-system 'utf-8-unix) 47 | (eq buffer-file-coding-system 'utf-8))))) 48 | 49 | (add-hook 'after-change-major-mode-hook #'jparcill/doom-modeline-conditional-buffer-encoding) 50 | 51 | 52 | ;; Package Specific Code In Order Of Importance 53 | ;; ------------------------------------------------------ 54 | (load! "core-func.el") 55 | (load! "secondary-func.el") 56 | ;;(load! "extra-func.el") 57 | 58 | ;; Custom Functions 59 | ;; ---------------- 60 | ;; 61 | 62 | (load! "org-roam-lite.el") 63 | 64 | ;; Function for clicking on the nearest file link above my cursor 65 | ;; Useful for me personally as I leave file links around in my org file 66 | (defun jparcill/click-on-file-above () 67 | (interactive) 68 | (progn (search-backward "dir: [[file:") 69 | (+org/dwim-at-point) 70 | ) 71 | ) 72 | ;; Uploading Images to Journal 73 | (defun jparcill/img-path-string (date) 74 | (interactive) 75 | (mapconcat (function (lambda (x) (concat (concat "\[\[" x) "\]\]\n"))) 76 | (seq-filter (function (lambda (x) (cl-search date x))) 77 | (directory-files-recursively "~/mobile_images/" 78 | "\\`[^.].*\\.jpg\\'" 79 | ) 80 | ) 81 | "" 82 | ) 83 | ) 84 | 85 | 86 | ;; Function to export a temporary pdf 87 | (defun jparcill/tmp-org-to-pdf () 88 | (interactive) 89 | (let ((new-file-name (concat "/tmp/" (buffer-name) ".pdf"))) 90 | (start-process-shell-command 91 | (concat (buffer-name) "-tmp-pdf") 92 | (concat (buffer-name) "-tmp-pdf") 93 | (concat "pandoc -o " new-file-name " " (buffer-file-name))) 94 | (sleep-for 1) 95 | (find-file new-file-name) 96 | ) 97 | ) 98 | 99 | (defun jparcill/upload-imgs-to-journal () 100 | "I use this function to attach images to the journal for the date that I choose" 101 | (interactive) 102 | (let ((date 103 | (replace-regexp-in-string "[^[:digit:]]" "" (org-read-date)))) 104 | 105 | (append-to-file 106 | (concat "\n* Images\n" (jparcill/img-path-string date)) 107 | nil 108 | (concat org-journal-dir (concat date ".org")) 109 | ) 110 | ) 111 | ) 112 | 113 | ;; Still doesn't work with monthly_habits 114 | (defun jparcill/extract-file-name (filename) 115 | "Extracts the desired file name from a given FILENAME string." 116 | (replace-regexp-in-string "\\.sync-conflict-[0-9]+-[0-9]+-[A-Z0-9]+\\." "." filename)) 117 | 118 | (defun jparcill/ediff-sync-conflict () 119 | (interactive) 120 | (let ((curr-file (car (directory-files-recursively org-file-path ".*sync-conflict.*")))) 121 | (progn 122 | (print (concat "Comparing: " curr-file " and " (jparcill/extract-file-name curr-file))) 123 | (ediff curr-file (jparcill/extract-file-name curr-file)) 124 | ) 125 | ) 126 | ) 127 | 128 | (defun jparcill/go-to-org () 129 | "Go to org directory" 130 | (interactive) 131 | (find-file org-file-path) 132 | ) 133 | 134 | 135 | (defun jparcill/open-with-xournal () 136 | (interactive) 137 | (start-process-shell-command (f-this-file) (f-this-file) (concat "xournalpp " (f-this-file)))) 138 | 139 | ;; Keybindings 140 | (global-set-key (kbd "C-c j") 'org-journal-new-entry) 141 | (global-set-key (kbd "C-c b") 'browse-kill-ring) 142 | (global-set-key (kbd "C-c c") '=calendar) 143 | (global-set-key (kbd "C-c l m") 'mathpix-screenshot) 144 | (global-set-key (kbd "C-c o o") 'jparcill/go-to-org) 145 | (global-set-key (kbd "C-c o n") 'jparcill/org-roam-lite-new-note) 146 | (global-set-key (kbd "C-c o s") 'jparcill/org-roam-lite-search-org) 147 | 148 | (if (not (equal (string-trim (shell-command-to-string "hostname")) "jared-virtualbox")) 149 | (global-set-key (kbd "C-c g") 'eww)) 150 | 151 | ;; Input images to org journal 152 | (global-set-key (kbd "C-c i") 'jparcill/upload-imgs-to-journal) 153 | 154 | (global-set-key (kbd "C-c s SPC") 'counsel-spotify-toggle-play-pause) 155 | (global-set-key (kbd "C-c s n") 'counsel-spotify-next) 156 | (global-set-key (kbd "C-c s p") 'counsel-spotify-previous) 157 | (global-set-key (kbd "C-c s /") 'counsel-spotify-search-album) 158 | (global-set-key (kbd "C-c s ?") 'counsel-spotify-search-track) 159 | (global-set-key (kbd "C-c s l") 'counsel-spotify-search-playlist) 160 | 161 | (evil-define-key 'normal org-mode-map 162 | (kbd "SPC m ;") 'org-babel-execute-src-block 163 | (kbd "SPC m :") 'org-babel-execute-subtree) 164 | 165 | (evil-define-key 'normal hydra-curr-map 166 | (kbd "ESC") 'hydra-keyboard-quit) 167 | 168 | (evil-define-key 'normal hydra-base-map 169 | (kbd "ESC") 'hydra-keyboard-quit) 170 | 171 | 172 | (evil-define-key* 'normal 'global 173 | (kbd "SPC g C-g") #'counsel-git-grep 174 | ) 175 | 176 | (map! :leader 177 | :prefix "w" 178 | :desc "Tab Bar History Hydra" "u" #'jparcill/hydra-window-undo/body 179 | ) 180 | 181 | (custom-set-faces 182 | ;; custom-set-faces was added by Custom. 183 | ;; If you edit it by hand, you could mess it up, so be careful. 184 | ;; Your init file should contain only one such instance. 185 | ;; If there is more than one, they won't work right. 186 | ) 187 | 188 | 189 | 190 | (custom-set-variables 191 | ;; custom-set-variables was added by Custom. 192 | ;; If you edit it by hand, you could mess it up, so be careful. 193 | ;; Your init file should contain only one such instance. 194 | ;; If there is more than one, they won't work right. 195 | '(ansi-color-names-vector 196 | ["#FFFBEA" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#556b72"]) 197 | '(custom-safe-themes 198 | (quote 199 | ("99ea831ca79a916f1bd789de366b639d09811501e8c092c85b2cb7d697777f93" "7a994c16aa550678846e82edc8c9d6a7d39cc6564baaaacc305a3fdc0bd8725f" "76bfa9318742342233d8b0b42e824130b3a50dcc732866ff8e47366aed69de11" "a92e9da0fab90cbec4af4a2035602208cebf3d071ea547157b2bfc5d9bd4d48d" "632694fd8a835e85bcc8b7bb5c1df1a0164689bc6009864faed38a9142b97057" default))) 200 | '(fci-rule-color "#D6D6D6") 201 | '(jdee-db-active-breakpoint-face-colors (cons "#FFFBF0" "#268bd2")) 202 | '(jdee-db-requested-breakpoint-face-colors (cons "#FFFBF0" "#859900")) 203 | '(jdee-db-spec-breakpoint-face-colors (cons "#FFFBF0" "#E1DBCD")) 204 | '(objed-cursor-color "#dc322f") 205 | '(org-modules (quote (org-habit))) 206 | '(package-selected-packages (quote (htmlize ox-hugo exwm))) 207 | '(pdf-view-midnight-colors (cons "#556b72" "#FDF6E3")) 208 | '(rustic-ansi-faces 209 | ["#FDF6E3" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#556b72"]) 210 | '(vc-annotate-background "#FDF6E3") 211 | '(vc-annotate-color-map 212 | (list 213 | (cons 20 "#859900") 214 | (cons 40 "#959300") 215 | (cons 60 "#a58e00") 216 | (cons 80 "#b58900") 217 | (cons 100 "#bc7407") 218 | (cons 120 "#c35f0e") 219 | (cons 140 "#cb4b16") 220 | (cons 160 "#cd4439") 221 | (cons 180 "#d03d5d") 222 | (cons 200 "#d33682") 223 | (cons 220 "#d63466") 224 | (cons 240 "#d9334a") 225 | (cons 260 "#dc322f") 226 | (cons 280 "#dd5c56") 227 | (cons 300 "#de867e") 228 | (cons 320 "#dfb0a5") 229 | (cons 340 "#D6D6D6") 230 | (cons 360 "#D6D6D6"))) 231 | '(vc-annotate-very-old-color nil)) 232 | 233 | (setq gc-cons-threshold (* 2 1000 1000)) ;; https://blog.d46.us/advanced-emacs-startup/ 234 | -------------------------------------------------------------------------------- /core-func.el: -------------------------------------------------------------------------------- 1 | ;;; core-func.el -*- lexical-binding: t; -*- 2 | 3 | (after! org (load! "org-conf.el")) 4 | 5 | (use-package! org-journal 6 | :defer t 7 | :init 8 | ;; org journal 9 | (setq org-journal-dir (concat org-file-path "journal/2022/")) 10 | (setq org-journal-file-type 'daily) 11 | (setq org-journal-file-format "%Y%m%d.org") 12 | (setq org-journal-date-format "%A, %B %d %Y") 13 | (setq org-extend-today-until 4) 14 | :config 15 | (setq org-journal-carryover-items "") 16 | ) 17 | 18 | (use-package! hl-todo 19 | :hook (prog-mode . hl-todo-mode) 20 | :config 21 | (setq hl-todo-keyword-faces 22 | `( 23 | ("PROJ" . ,(face-foreground 'error)) 24 | ("SOMEDAY" . ,(face-foreground 'warning)) 25 | ("TODO" . ,(face-foreground 'warning)) 26 | ("PROG" . ,(face-foreground 'error)) 27 | ("NEXT" . ,(face-foreground 'error)) 28 | ("WAIT" . ,(face-foreground 'warning)) 29 | ("CANCEL" . ,(face-foreground 'error)) 30 | ("DELEGATED" . ,(face-foreground 'error)) 31 | ("IDEA" . ,(face-foreground 'warning)) 32 | ("GOAL" . ,(face-foreground 'warning)) 33 | ("DUD" . ,(face-foreground 'error)) 34 | ("RD" . ,(face-foreground 'warning)) 35 | ("RDING" . ,(face-foreground 'warning)) 36 | ("RDNOTE" . ,(face-foreground 'warning)) 37 | ("TMPDROP" . ,(face-foreground 'warning)) 38 | ("DROP" . ,(face-foreground 'error)) 39 | ("FNSHED" . ,(face-foreground 'success)) 40 | ("DONE" . ,(face-foreground 'success)))) 41 | ) 42 | 43 | (use-package! calfw-org 44 | :after calfw 45 | ) 46 | 47 | (use-package! org-agenda 48 | :defer t 49 | :init 50 | 51 | (setq org-agenda-files (list 52 | (concat org-file-path "phone_folder/") 53 | ;;(concat org-file-path "taxes.org") 54 | ;;(concat org-file-path "reflections/2021_refl.org") 55 | ;;(concat org-file-path "projects/2021/") 56 | )) 57 | 58 | :config 59 | (setq org-habit-show-habits-only-for-today t) 60 | (setq org-agenda-include-deadlines t) 61 | (setq org-agenda-inhibit-startup t) 62 | (setq org-agenda-dim-blocked-tasks "invisible") 63 | (setq org-agenda-span 14) 64 | ) 65 | 66 | 67 | (use-package! org-super-agenda 68 | :after org-agenda 69 | :init 70 | ;; for some reason org-agenda evil bindings were being weird with j and k 71 | (map! :map org-agenda-keymap "j" #'org-agenda-next-line) 72 | (map! :map org-agenda-mode-map "j" #'org-agenda-next-line) 73 | (map! :map org-super-agenda-header-map "j" #'org-agenda-next-line) 74 | (map! :map org-agenda-keymap "k" #'org-agenda-previous-line) 75 | (map! :map org-agenda-mode-map "k" #'org-agenda-previous-line) 76 | (map! :map org-super-agenda-header-map "k" #'org-agenda-previous-line) 77 | (map! :map org-super-agenda-header-map "k" #'org-agenda-previous-line) 78 | (map! :map org-super-agenda-header-map "k" #'org-agenda-previous-line) 79 | 80 | (setq org-agenda-custom-commands '( 81 | ("r" "Main View" 82 | ((agenda "" ((org-agenda-span 'day) 83 | (org-agenda-start-day "+0d") 84 | (org-agenda-overriding-header "") 85 | (org-super-agenda-groups 86 | '( 87 | (:name "Past Habits" 88 | :tag "habit" 89 | :scheduled past) 90 | (:name "Leftover Habits" 91 | :tag "habit") 92 | (:name "Today" 93 | :time-grid t 94 | :date today 95 | :scheduled today))))) 96 | (alltodo "" ((org-agenda-overriding-header "") 97 | (org-super-agenda-groups 98 | '( 99 | (:discard (:habit)) 100 | (:todo "PROJ") 101 | (:todo "PROG") 102 | (:todo "NEXT") 103 | (:todo "WAIT") 104 | (:todo "RDNOTE") 105 | (:name "Important" :priority "A") 106 | (:and (:todo "TODO" :deadline nil :scheduled nil)) 107 | (:todo "GOAL") 108 | (:todo "RDING") 109 | (:and (:todo "TODO" :deadline t)) 110 | (:discard (:todo "TODO")) 111 | (:discard (:todo "RD")) 112 | (:discard (:todo "IDEA")) 113 | (:discard (:todo "TMPDROP")) 114 | (:discard (:todo "SOMEDAY")) 115 | ))))) 116 | ) 117 | 118 | ("w" "Someday and Idea" 119 | ((alltodo "" ((org-agenda-overriding-header "") 120 | (org-super-agenda-groups 121 | '( 122 | (:todo "IDEA") 123 | (:todo "SOMEDAY") 124 | (:discard (:not "IDEA")) 125 | ) 126 | ))))) 127 | 128 | ("R" "Today's" ((agenda "" ((org-agenda-span 'day) 129 | (org-agenda-start-day "+0d") 130 | (org-agenda-overriding-header "") 131 | (org-super-agenda-groups 132 | '((:name "Today" 133 | :date today 134 | :scheduled today 135 | :todo "TODAY" 136 | :discard (:not (:deadline today)))))))) 137 | nil (concat org-file-path "phone_folder/Tasker/today.txt")) 138 | 139 | ("l" "Location" ((alltodo "" ( 140 | (org-agenda-overriding-header "") 141 | (org-super-agenda-groups 142 | '((:name "Ajax" 143 | :tag "ajax" 144 | ) 145 | (:name "Office" 146 | :tag "office" 147 | ) 148 | (:name "Out" 149 | :tag "out" 150 | ) 151 | (:name "Home" 152 | :tag "home" 153 | ) 154 | (:name "Work" 155 | :tag "work") 156 | (:name "Location" 157 | :tag "location") 158 | (:discard (:anything t)) 159 | ))))) 160 | nil (concat org-file-path "phone_folder/Tasker/location.txt")) 161 | 162 | ("k" "Weekly Review" 163 | ((tags "CLOSED>=\"<-1w>\"")) nil 164 | (concat org-file-path "phone_folder/Tasker/weekly_closed.txt") 165 | ))) 166 | ;;:config 167 | (org-super-agenda-mode) 168 | ) 169 | -------------------------------------------------------------------------------- /init.el: -------------------------------------------------------------------------------- 1 | ;;; init.el -*- lexical-binding: t; -*- 2 | 3 | ;; This file controls what Doom modules are enabled and what order they load 4 | ;; in. Remember to run 'doom sync' after modifying it! 5 | 6 | ;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's 7 | ;; documentation. There you'll find a "Module Index" link where you'll find 8 | ;; a comprehensive list of Doom's modules and what flags they support. 9 | 10 | ;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or 11 | ;; 'C-c c k' for non-vim users) to view its documentation. This works on 12 | ;; flags as well (those symbols that start with a plus). 13 | ;; 14 | ;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its 15 | ;; directory (for easy access to its source code). 16 | 17 | (doom! :input 18 | ;;chinese 19 | ;;japanese 20 | ;;layout ; auie,ctsrnm is the superior home row 21 | 22 | :completion 23 | ;; company ; the ultimate code completion backend 24 | ;;helm ; the *other* search engine for love and life 25 | ;;ido ; the other *other* search engine... 26 | ivy ; a search engine for love and life 27 | 28 | :ui 29 | ;; deft ; notational velocity for Emacs 30 | doom ; what makes DOOM look the way it does 31 | doom-dashboard ; a nifty splash screen for Emacs 32 | doom-quit ; DOOM quit-message prompts when you quit Emacs 33 | ;;(emoji +unicode) ; 🙂 34 | ;;fill-column ; a `fill-column' indicator 35 | hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW 36 | hydra 37 | ;; indent-guides ; highlighted indent columns 38 | ;; (ligatures ; ligatures and symbols to make your code pretty again 39 | ;; +extra) 40 | ;; minimap ; show a map of the code on the side 41 | ;; modeline ; snazzy, Atom-inspired modeline, plus API 42 | ;;nav-flash ; blink cursor line after big motions 43 | ;;neotree ; a project drawer, like NERDTree for vim 44 | ophints ; highlight the region an operation acts on 45 | (popup +defaults) ; tame sudden yet inevitable temporary windows 46 | ;;tabs ; an tab bar for Emacs 47 | treemacs ; a project drawer, like neotree but cooler 48 | ;;unicode ; extended unicode support for various languages 49 | vc-gutter ; vcs diff in the fringe 50 | vi-tilde-fringe ; fringe tildes to mark beyond EOB 51 | window-select ; visually switch windows 52 | ;; workspaces ; tab emulation, persistence & separate workspaces 53 | ;;zen ; distraction-free coding or writing 54 | 55 | :editor 56 | (evil +everywhere); come to the dark side, we have cookies 57 | file-templates ; auto-snippets for empty files 58 | fold ; (nigh) universal code folding 59 | format ; automated prettiness 60 | ;;god ; run Emacs commands without modifier keys 61 | ;;lispy ; vim for lisp, for people who don't like vim 62 | ;;multiple-cursors ; editing in many places at once 63 | ;;objed ; text object editing for the innocent 64 | ;;parinfer ; turn lisp into python, sort of 65 | ;;rotate-text ; cycle region at point between text candidates 66 | snippets ; my elves. They type so I don't have to 67 | word-wrap ; soft wrapping with language-aware indent 68 | 69 | :emacs 70 | (dired ; making dired pretty [functional] 71 | +ranger 72 | +icons 73 | ) 74 | ;; electric ; smarter, keyword-based electric-indent 75 | ibuffer ; interactive buffer management 76 | undo ; persistent, smarter undo for your inevitable mistakes 77 | vc ; version-control and Emacs, sitting in a tree 78 | 79 | :term 80 | eshell ; the elisp shell that works everywhere 81 | ;;shell ; simple shell REPL for Emacs 82 | ;;term ; basic terminal emulator for Emacs 83 | vterm ; the best terminal emulation in Emacs 84 | 85 | :checkers 86 | ;; syntax ; tasing you for every semicolon you forget 87 | ;;(spell +flyspell) ; tasing you for misspelling mispelling 88 | ;;grammar ; tasing grammar mistake every you make 89 | 90 | :tools 91 | ;;ansible 92 | ;; debugger ; FIXME stepping through code, to help you add bugs 93 | ;;direnv 94 | ;;docker 95 | ;;editorconfig ; let someone else argue about tabs vs spaces 96 | ;; ein ; tame Jupyter notebooks with emacs 97 | (eval +overlay) ; run code, run (also, repls) 98 | ;;gist ; interacting with github gists 99 | ;; (lookup ; navigate your code and its documentation 100 | ;; +dictionary 101 | ;; +offline 102 | ;; +docsets) 103 | ;;lsp 104 | magit ; a git porcelain for Emacs 105 | ;;make ; run make tasks from Emacs 106 | ;;pass ; password manager for nerds 107 | ;; pdf ; pdf enhancements 108 | ;;prodigy ; FIXME managing external services & code builders 109 | rgb ; creating color strings 110 | ;;taskrunner ; taskrunner for all your projects 111 | ;;terraform ; infrastructure as code 112 | ;;tmux ; an API for interacting with tmux 113 | ;;upload ; map local to remote projects via ssh/ftp 114 | 115 | :os 116 | (:if IS-MAC macos) ; improve compatibility with macOS 117 | tty ; improve the terminal Emacs experience 118 | 119 | :lang 120 | ;;agda ; types of types of types of types... 121 | ;; cc ; C/C++/Obj-C madness 122 | ;;clojure ; java with a lisp 123 | ;;common-lisp ; if you've seen one lisp, you've seen them all 124 | ;;coq ; proofs-as-programs 125 | ;;crystal ; ruby at the speed of c 126 | ;;csharp ; unity, .NET, and mono shenanigans 127 | data ; config/data formats 128 | ;;(dart +flutter) ; paint ui and not much else 129 | ;;elixir ; erlang done right 130 | ;;elm ; care for a cup of TEA? 131 | emacs-lisp ; drown in parentheses 132 | ;;erlang ; an elegant language for a more civilized age 133 | ess ; emacs speaks statistics 134 | ;;faust ; dsp, but you get to keep your soul 135 | ;;fsharp ; ML stands for Microsoft's Language 136 | ;;fstar ; (dependent) types and (monadic) effects and Z3 137 | ;;gdscript ; the language you waited for 138 | ;;(go +lsp) ; the hipster dialect 139 | ;;(haskell +dante) ; a language that's lazier than I am 140 | ;;hy ; readability of scheme w/ speed of python 141 | ;;idris ; 142 | ;; json ; At least it ain't XML 143 | ;;(java +meghanada) ; the poster child for carpal tunnel syndrome 144 | ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) 145 | ;; julia ; a better, faster MATLAB 146 | ;;kotlin ; a better, slicker Java(Script) 147 | ;; latex ; writing papers in Emacs has never been so fun 148 | ;;lean 149 | ;;factor 150 | ;;ledger ; an accounting system in Emacs 151 | ;;lua ; one-based indices? one-based indices 152 | ;; markdown ; writing docs for people to ignore 153 | ;;nim ; python + lisp at the speed of c 154 | ;;nix ; I hereby declare "nix geht mehr!" 155 | ;;ocaml ; an objective camel 156 | (org ; organize your plain life in plain text 157 | ;; +dragndrop 158 | ;; +hugo 159 | +journal 160 | ;;+jupyter 161 | ;; +noter 162 | +pandoc 163 | +pretty 164 | ;;+present 165 | ;;+roam2 166 | ) 167 | ;;php ; perl's insecure younger brother 168 | ;;plantuml ; diagrams for confusing people more 169 | ;;purescript ; javascript, but functional 170 | python ; beautiful is better than ugly 171 | ;;qt ; the 'cutest' gui framework ever 172 | ;;racket ; a DSL for DSLs 173 | ;;raku ; the artist formerly known as perl6 174 | ;;rest ; Emacs as a REST client 175 | ;;rst ; ReST in peace 176 | ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} 177 | ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() 178 | ;;scala ; java, but good 179 | ;;scheme ; a fully conniving family of lisps 180 | sh ; she sells {ba,z,fi}sh shells on the C xor 181 | ;;sml 182 | ;;solidity ; do you need a blockchain? No. 183 | ;;swift ; who asked for emoji variables? 184 | ;;terra ; Earth and Moon in alignment for performance. 185 | ;;web ; the tubes 186 | ;;yaml ; JSON, but readable 187 | 188 | :email 189 | ;;(mu4e +gmail) 190 | ;;notmuch 191 | ;;(wanderlust +gmail) 192 | 193 | :app 194 | calendar 195 | ;;emms 196 | ;;everywhere ; *leave* Emacs!? You must be joking 197 | irc ; how neckbeards socialize 198 | (rss +org) ; emacs as an RSS reader 199 | ;;twitter ; twitter client https://twitter.com/vnought 200 | 201 | :config 202 | ;;literate 203 | (default +bindings +smartparens)) 204 | -------------------------------------------------------------------------------- /phone-init.el: -------------------------------------------------------------------------------- 1 | ;;; init.el -*- lexical-binding: t; -*- 2 | 3 | ;; This file controls what Doom modules are enabled and what order they load 4 | ;; in. Remember to run 'doom sync' after modifying it! 5 | 6 | ;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's 7 | ;; documentation. There you'll find a "Module Index" link where you'll find 8 | ;; a comprehensive list of Doom's modules and what flags they support. 9 | 10 | ;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or 11 | ;; 'C-c c k' for non-vim users) to view its documentation. This works on 12 | ;; flags as well (those symbols that start with a plus). 13 | ;; 14 | ;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its 15 | ;; directory (for easy access to its source code). 16 | 17 | (doom! :input 18 | ;;chinese 19 | ;;japanese 20 | ;;layout ; auie,ctsrnm is the superior home row 21 | 22 | :completion 23 | company ; the ultimate code completion backend 24 | ;;helm ; the *other* search engine for love and life 25 | ;;ido ; the other *other* search engine... 26 | ivy ; a search engine for love and life 27 | 28 | :ui 29 | deft ; notational velocity for Emacs 30 | doom ; what makes DOOM look the way it does 31 | doom-dashboard ; a nifty splash screen for Emacs 32 | doom-quit ; DOOM quit-message prompts when you quit Emacs 33 | (emoji +unicode) ; 🙂 34 | ;;fill-column ; a `fill-column' indicator 35 | hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW 36 | hydra 37 | indent-guides ; highlighted indent columns 38 | ;;(ligatures ; ligatures and symbols to make your code pretty again 39 | ;; +extra) 40 | ;; minimap ; show a map of the code on the side 41 | modeline ; snazzy, Atom-inspired modeline, plus API 42 | ;;nav-flash ; blink cursor line after big motions 43 | ;;neotree ; a project drawer, like NERDTree for vim 44 | ophints ; highlight the region an operation acts on 45 | (popup +defaults) ; tame sudden yet inevitable temporary windows 46 | ;;tabs ; an tab bar for Emacs 47 | ;;treemacs ; a project drawer, like neotree but cooler 48 | ;;unicode ; extended unicode support for various languages 49 | ;;vc-gutter ; vcs diff in the fringe 50 | vi-tilde-fringe ; fringe tildes to mark beyond EOB 51 | window-select ; visually switch windows 52 | ;; workspaces ; tab emulation, persistence & separate workspaces 53 | ;;zen ; distraction-free coding or writing 54 | 55 | :editor 56 | (evil +everywhere); come to the dark side, we have cookies 57 | ;;file-templates ; auto-snippets for empty files 58 | fold ; (nigh) universal code folding 59 | ;; format ; automated prettiness 60 | ;;god ; run Emacs commands without modifier keys 61 | ;;lispy ; vim for lisp, for people who don't like vim 62 | ;;multiple-cursors ; editing in many places at once 63 | ;;objed ; text object editing for the innocent 64 | ;;parinfer ; turn lisp into python, sort of 65 | ;;rotate-text ; cycle region at point between text candidates 66 | snippets ; my elves. They type so I don't have to 67 | word-wrap ; soft wrapping with language-aware indent 68 | 69 | :emacs 70 | (dired ; making dired pretty [functional] 71 | +ranger 72 | +icons 73 | ) 74 | electric ; smarter, keyword-based electric-indent 75 | ibuffer ; interactive buffer management 76 | undo ; persistent, smarter undo for your inevitable mistakes 77 | vc ; version-control and Emacs, sitting in a tree 78 | 79 | :term 80 | eshell ; the elisp shell that works everywhere 81 | ;;shell ; simple shell REPL for Emacs 82 | ;;term ; basic terminal emulator for Emacs 83 | ;; vterm ; the best terminal emulation in Emacs 84 | 85 | :checkers 86 | ;; syntax ; tasing you for every semicolon you forget 87 | ;; (spell +flyspell) ; tasing you for misspelling mispelling 88 | ;; grammar ; tasing grammar mistake every you make 89 | 90 | :tools 91 | ;;ansible 92 | ;; debugger ; FIXME stepping through code, to help you add bugs 93 | ;;direnv 94 | ;;docker 95 | ;;editorconfig ; let someone else argue about tabs vs spaces 96 | ;; ein ; tame Jupyter notebooks with emacs 97 | ;; (eval +overlay) ; run code, run (also, repls) 98 | ;;gist ; interacting with github gists 99 | ;; (lookup ; navigate your code and its documentation 100 | ;; +dictionary 101 | ;; +offline 102 | ;; +docsets) 103 | ;; lsp 104 | ;; magit ; a git porcelain for Emacs 105 | ;;make ; run make tasks from Emacs 106 | ;;pass ; password manager for nerds 107 | ;; pdf ; pdf enhancements 108 | ;;prodigy ; FIXME managing external services & code builders 109 | ;; rgb ; creating color strings 110 | ;;taskrunner ; taskrunner for all your projects 111 | ;;terraform ; infrastructure as code 112 | ;;tmux ; an API for interacting with tmux 113 | ;;upload ; map local to remote projects via ssh/ftp 114 | 115 | :os 116 | ;; (:if IS-MAC macos) ; improve compatibility with macOS 117 | tty ; improve the terminal Emacs experience 118 | 119 | :lang 120 | ;;agda ; types of types of types of types... 121 | ;; cc ; C/C++/Obj-C madness 122 | ;;clojure ; java with a lisp 123 | ;;common-lisp ; if you've seen one lisp, you've seen them all 124 | ;;coq ; proofs-as-programs 125 | ;;crystal ; ruby at the speed of c 126 | ;;csharp ; unity, .NET, and mono shenanigans 127 | ;; data ; config/data formats 128 | ;;(dart +flutter) ; paint ui and not much else 129 | ;;elixir ; erlang done right 130 | ;;elm ; care for a cup of TEA? 131 | emacs-lisp ; drown in parentheses 132 | ;;erlang ; an elegant language for a more civilized age 133 | ;; (ess ; emacs speaks statistics 134 | ;; +lsp) 135 | ;;faust ; dsp, but you get to keep your soul 136 | ;;fsharp ; ML stands for Microsoft's Language 137 | ;;fstar ; (dependent) types and (monadic) effects and Z3 138 | ;;gdscript ; the language you waited for 139 | ;; (go +lsp) ; the hipster dialect 140 | ;;(haskell +dante) ; a language that's lazier than I am 141 | ;;hy ; readability of scheme w/ speed of python 142 | ;;idris ; 143 | ;; json ; At least it ain't XML 144 | ;;(java +meghanada) ; the poster child for carpal tunnel syndrome 145 | ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) 146 | ;; julia ; a better, faster MATLAB 147 | ;;kotlin ; a better, slicker Java(Script) 148 | ;; latex ; writing papers in Emacs has never been so fun 149 | ;;lean 150 | ;;factor 151 | ;;ledger ; an accounting system in Emacs 152 | ;;lua ; one-based indices? one-based indices 153 | ;; markdown ; writing docs for people to ignore 154 | ;;nim ; python + lisp at the speed of c 155 | ;;nix ; I hereby declare "nix geht mehr!" 156 | ;;ocaml ; an objective camel 157 | (org ; organize your plain life in plain text 158 | +dragndrop 159 | ;; +hugo 160 | +journal 161 | ;; +jupyter 162 | ;; +noter 163 | ;; +pandoc 164 | +pretty 165 | ;; +present 166 | ;; +roam 167 | ) 168 | ;;php ; perl's insecure younger brother 169 | ;;plantuml ; diagrams for confusing people more 170 | ;;purescript ; javascript, but functional 171 | ;; python ; beautiful is better than ugly 172 | ;;qt ; the 'cutest' gui framework ever 173 | ;;racket ; a DSL for DSLs 174 | ;;raku ; the artist formerly known as perl6 175 | ;;rest ; Emacs as a REST client 176 | ;;rst ; ReST in peace 177 | ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} 178 | ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() 179 | ;;scala ; java, but good 180 | ;;scheme ; a fully conniving family of lisps 181 | sh ; she sells {ba,z,fi}sh shells on the C xor 182 | ;;sml 183 | ;;solidity ; do you need a blockchain? No. 184 | ;;swift ; who asked for emoji variables? 185 | ;;terra ; Earth and Moon in alignment for performance. 186 | ;;web ; the tubes 187 | ;;yaml ; JSON, but readable 188 | 189 | :email 190 | ;;(mu4e +gmail) 191 | ;;notmuch 192 | ;;(wanderlust +gmail) 193 | 194 | :app 195 | calendar 196 | ;;emms 197 | ;;everywhere ; *leave* Emacs!? You must be joking 198 | ;; irc ; how neckbeards socialize 199 | (rss +org) ; emacs as an RSS reader 200 | ;;twitter ; twitter client https://twitter.com/vnought 201 | 202 | :config 203 | ;;literate 204 | (default +bindings +smartparens)) 205 | -------------------------------------------------------------------------------- /template/uwmathcn.cls: -------------------------------------------------------------------------------- 1 | % Written by Michael A. La Croix (malacroi@alumni.uwaterloo.ca) 2 | % for use in the Math 136 and related course notes. With funding 3 | % provided by the Math Endowment Fund. 4 | % 5 | % This class provides a mechanism for creating theorem environments 6 | % (using the syntax of amsthm), that are typeset of coloured 7 | % backgrounds. All theorem environments produced in this manner 8 | % support an optional argument to include a heading. 9 | % 10 | % An aesthetically matched definition environment is used to 11 | % place keywords in the left margin. 12 | % 13 | % The option 14 | % nocolor can be passed to the class to switch all margin 15 | % labels to black, and to produce greyscale backgrounds 16 | % that are better suited to mass printing. 17 | % 18 | % \theoremcolors{rgb}{0.8,.4,0}{rgb}{1,.85,.5} 19 | % % Theorems will use orange headings and a light orange background 20 | % 21 | % \newtheorem{thm}{Theorem}[section] 22 | % % The thm environment is labelled Theorem, and numbered 23 | % % within sections 24 | % 25 | % \newtheorem{lem}[thm]{Lemma} 26 | % % A corresponding environment for lemmas will share the 27 | % % same counter 28 | % 29 | % \theoremcolors{gray}{0}{gray}{.85} 30 | % % Subsequent theorems will use black labels and 31 | % % light gray backgrounds 32 | % 33 | % \newtheorem*{rem}{Remark} 34 | % % An environment for remarks will be unnumbered, and 35 | % % place labels within the shaded block 36 | % 37 | % % This theorem will appear on an orange background 38 | % \begin{thm}[The Fundamental Theorem of Everything] 39 | % What a great theorem. 40 | % \end{thm} 41 | % 42 | % % Note: the marginal definition notes cannot be placed 43 | % % using marginpar, since it is fundamentally incompatible 44 | % % with framed. 45 | % \begin{defn}{term 1\\term 2\\term 3} 46 | % \end{defn} 47 | % 48 | % 49 | % TODO: 50 | % Integrate the exercises package 51 | % Hook for controlling the typesetting of theorem numbers 52 | % Hooks for the defn environment 53 | % 54 | % Notes: 55 | % The shaded backgrounds are obtained via the framed 56 | % package. The mechanism is fundamentally incompatible 57 | % with marginpar, footnotes, and column balancing. 58 | % 59 | \NeedsTeXFormat{LaTeX2e} 60 | \ProvidesClass{uwmathcn}[2010/12/09 A course notes class for UW Math] 61 | 62 | % This should probably take the font size as an option 63 | \LoadClass[12pt,openany]{book} 64 | 65 | % Make our life a lot easier 66 | \RequirePackage{color} 67 | 68 | % make margins behave nicely 69 | \RequirePackage[asymmetric]{geometry} 70 | 71 | % Stop the user from loading amsthm on their own and clobbering 72 | % our newtheorem command. 73 | \RequirePackage{amsmath,amsthm,amssymb} 74 | 75 | % This package is a very mature was of dealing with headers 76 | \RequirePackage{fancyhdr} 77 | 78 | % Framed is listed as experimental, but it does exactly what 79 | % we need to allow shaded backgrounds to split across page 80 | % boundaries. 81 | \RequirePackage{framed} 82 | 83 | \usepackage[dvips]{graphicx} 84 | \usepackage[dvips]{psfrag} 85 | \usepackage{paralist} 86 | \usepackage{array} 87 | \usepackage{tabularx} 88 | \usepackage{polynom} 89 | 90 | %% Set up the fonts 91 | \RequirePackage{txfonts} 92 | \renewcommand{\normalsize}{\fontsize{12}{14}\selectfont} 93 | \renewcommand{\large}{\fontsize{13}{15}\selectfont} 94 | \newcommand{\ExampleHeadingFont}{\fontsize{14}{14}\selectfont} 95 | \newcommand{\TheoremHeadingFont}{\fontsize{14}{14}\selectfont} 96 | \newcommand{\ProblemHeadingFont}{\fontsize{14}{14}\bfseries\selectfont} 97 | \newcommand{\TheoremContFont}{\fontsize{12}{14}\selectfont} 98 | \renewcommand{\Large}{\fontsize{14}{16.5}\selectfont} 99 | \newcommand{\DefHeadFont}{\fontsize{14}{14}\bfseries\selectfont}% 100 | \newcommand{\keywordstyle}{\fontsize{8.5}{10}\bfseries\Highlight\selectfont} 101 | 102 | 103 | % Course Notes will be available in two forms: 104 | % color - for online viewing 105 | % nocolor - for printing (make sure most text is black) 106 | \newif\if@nocolor 107 | \DeclareOption{nocolor}{\@nocolortrue} 108 | \ProcessOptions 109 | 110 | % A box and a length for measuring the marginal names of theorems 111 | \newsavebox{\thmbox}\newlength{\thmsize} 112 | \renewcommand{\newtheorem}{\@ifstar{\newtheoremStar}{\newtheoremNoStarx}} 113 | % \theoremcolors set the value for margin text and background colours 114 | % associated with all newtheorem environments declared before the 115 | % next use of theoremcolors 116 | \newcommand{\theoremcolors}[4]{%space value space values 117 | \def\newtheoremNoStarx##1{% 118 | \@ifnextchar[{\newtheoremNoStary{##1}}{\newtheoremNoStary{##1}[##1]}% 119 | } 120 | \def\newtheoremNoStary##1[##2]##3{% 121 | \@ifnextchar[{\newtheoremNoStar{##1}[##2]{##3}}% 122 | {\newtheoremNoStar{##1}[##2]{##3}[]}% 123 | } 124 | \def\newtheoremNoStar##1[##2]##3[##4]{% 125 | \@ifundefined{c@##2}{\ifx\relax##4\relax\newcounter{##2}% 126 | \else\newcounter{##2}[##4]\fi}{}% 127 | \newenvironment{##1}[1][]{% 128 | \refstepcounter{##2}% 129 | \sbox{\thmbox}{\bf\color[#1]{#2}\large\MakeUppercase{##3} % 130 | \arabic{chapter}.\arabic{section}.\arabic{##2}\hspace*{\marginlabelgap}}%Numbering of environment 131 | \settowidth{\thmsize}{{\usebox\thmbox}}% 132 | \definecolor{shadecolor}{#3}{#4}\begin{shaded}% 133 | \hspace*{-\thmsize}\raisebox{0pt}[0pt][0pt]{\usebox{\thmbox}}\ignorespaces% 134 | \ifx\relax####1\relax\else% 135 | \textcolor[#1]{#2}{\large\bf(####1)}\par\nobreak% 136 | \fi% 137 | }% 138 | {\end{shaded}\ignorespacesafterend}% 139 | }% 140 | \def\newtheoremStar##1##2{% 141 | \newenvironment{##1}[1][]{% 142 | \goodbreak% 143 | \definecolor{shadecolor}{#3}{#4}\begin{shaded}% 144 | \textcolor[#1]{#2}{{\large\bf\MakeUppercase{##2}% 145 | \ifx\relax####1\relax\else\ (####1)\fi}}% 146 | \par\nobreak}% 147 | {\end{shaded}}% 148 | } 149 | } 150 | % The default theorem environment uses black text and a 151 | % light gray background. If the nocolor option has been 152 | % passed, redefined \theoremcolors to stop the user from 153 | % changing this behaviour. 154 | \theoremcolors{gray}{0}{gray}{.95} 155 | \if@nocolor\renewcommand{\theoremcolors}[4]{}\fi 156 | 157 | % This is copied from amsthm, but with \textit replaced 158 | % by \textbf 159 | \renewenvironment{proof}[1][\proofname]{\par 160 | \pushQED{\qed}% 161 | \normalfont \topsep6\p@\@plus6\p@\relax 162 | \trivlist 163 | \item[\hskip\labelsep% 164 | \textbf{#1\@addpunct{:}}]\ignorespaces 165 | }{% 166 | \popQED\endtrivlist\@endpefalse 167 | } 168 | \providecommand{\proofname}{Proof} 169 | 170 | % override the spacing of a new line between key words 171 | % also practise working with tail recursion 172 | \def\setkeywords#1\\{% 173 | \ifx\relax#1\relax\let\nextstep\relax% 174 | \else#1\\[\keywordskip]\let\nextstep\setkeywords% 175 | \fi\nextstep% 176 | } 177 | % 178 | \newenvironment{defn}[1]{% 179 | \ignorespaces%encourage a page break before the definition 180 | \if@nocolor\definecolor{shadecolor}{gray}{.95}% 181 | \else\definecolor{shadecolor}{rgb}{1,1,.65}\fi\begin{shaded}% 182 | \sbox{\thmbox}{\if@nocolor\else\color[rgb]{.5,.3,0}\fi% 183 | \bf\large\MakeUppercase{Definition}\hspace*{\marginlabelgap}}% 184 | \settowidth{\thmsize}{\usebox{\thmbox}}% 185 | \makebox[0pt]{\hspace*{-\thmsize}\raisebox{0pt}[0pt][0pt]{\usebox{\thmbox}}}% 186 | \ifx\relax#1\relax\else% 187 | \makebox[0pt]{\hspace*{-\thmsize}\raisebox{0pt}[0pt][0pt]{% 188 | \addtolength{\thmsize}{-\marginlabelgap}% 189 | \begin{minipage}[t]{\thmsize}\noindent% 190 | \renewcommand\baselinestretch{.8}% 191 | \footnotesize\bf\begin{center}\setkeywords#1\\\\\end{center}% 192 | \end{minipage}}\hspace*{\marginlabelgap}}% 193 | \fi\ignorespaces% 194 | }{\ignorespacesafterend\end{shaded}} 195 | 196 | % This might not be appropriate for other courses with 197 | % less blocky display math 198 | \allowdisplaybreaks[3] 199 | 200 | % The table of contents should have small interline spacing 201 | \let\@oldtableofcontents\tableofcontents 202 | \def\tableofcontents{{\setlength\parskip{0pt}\@oldtableofcontents}} 203 | 204 | \let\@origdoublepage\cleardoublepage 205 | \renewcommand{\cleardoublepage}{\clearpage{\pagestyle{empty}\@origdoublepage}} 206 | 207 | % Set page measurements 208 | \setlength{\parindent}{0pt} 209 | \setlength{\parskip}{1.5ex plus 1ex minus 0.5ex} 210 | \setlength{\oddsidemargin}{1in} 211 | \setlength{\evensidemargin}{1in} 212 | \setlength{\topmargin}{-0.75in} 213 | \setlength{\headheight}{15pt} 214 | \setlength{\paperheight}{11in} 215 | \setlength{\paperwidth}{8.5in} 216 | \setlength{\textheight}{9.5in} 217 | \setlength{\textwidth}{5.6in} 218 | \setlength{\abovecaptionskip}{1ex} 219 | \newlength{\marginlabelgap}\setlength{\marginlabelgap}{.25in} 220 | \newlength{\keywordskip}\setlength{\keywordskip}{1ex} 221 | 222 | \let\@oldmainmatter\mainmatter 223 | \let\@oldfrontmatter\frontmatter 224 | \renewcommand{\mainmatter}{\@oldmainmatter% 225 | \setlength{\oddsidemargin}{1.13in}% 226 | \setlength{\evensidemargin}{1.13in}% 227 | \pagestyle{fancy}% 228 | } 229 | \renewcommand{\frontmatter}{\@oldfrontmatter% 230 | \setlength{\oddsidemargin}{.47in}% 231 | \setlength{\evensidemargin}{.47in}% 232 | \pagestyle{plain}% 233 | } 234 | 235 | % Figures 236 | \setlength{\textfloatsep}{.25in} 237 | \setlength{\intextsep}{15pt} 238 | \let\@beginfigure\figure 239 | \let\@endfigure\endfigure 240 | \renewcommand{\figure}{\@beginfigure\begin{center}} 241 | \renewcommand{\endfigure}{\end{center}\@endfigure} 242 | \newcommand{\captionsize}{\footnotesize} 243 | \newcommand{\captionfonts}{\captionsize} 244 | \long\def\@makecaption#1#2{% 245 | \vskip\abovecaptionskip 246 | \sbox\@tempboxa{{\captionfonts \textbf{#1: }#2}}% 247 | \ifdim \wd\@tempboxa >\hsize 248 | {\captionfonts #1: #2\par} 249 | \else 250 | \hbox to\hsize{\hfil\box\@tempboxa\hfil}% 251 | \fi 252 | \vskip\belowcaptionskip} 253 | \renewcommand{\fps@figure}{!htb} 254 | \renewcommand{\fps@table}{!htb} 255 | 256 | % This is supposed to help TeX understand that stretching white 257 | % space is OK 258 | \addtolength{\topskip}{0pt plus 10pt} 259 | \reversemarginpar 260 | 261 | % Set up the headers and footers 262 | \pagestyle{fancy} 263 | \renewcommand{\chaptermark}[1]{\markboth{#1}{}} 264 | \renewcommand{\sectionmark}[1]{\markright{#1}} 265 | \fancyhfoffset[L]{1.5in} 266 | \renewcommand{\headrulewidth}{0.0pt} 267 | \lhead[{\thepage} ]{Section \thesection \quad \rightmark} 268 | \rhead[\chaptername \thickspace \thechapter \quad \leftmark]{{\thepage}} 269 | \cfoot{} 270 | 271 | \widowpenalty=100 272 | \clubpenalty=100 273 | \raggedbottom 274 | --------------------------------------------------------------------------------