aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/emacs.el289
-rw-r--r--config/emacs.org346
-rw-r--r--index.org2
-rw-r--r--journal/20240228.org12
-rw-r--r--mindmap/ltximg/org-ltximg_068e203465943ac2b8cecbc60a1d8c00c0da822b.pngbin0 -> 8248 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_0ccddf8f2a48e19abd82e52a415d7bce2448acf2.pngbin0 -> 248 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_17952f0ac45016695132050a651326fbd094df9b.pngbin0 -> 1266 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_19900c8b9a2969c894ddf29578c1006249d122cf.pngbin0 -> 3599 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_1d52da18669d298f9ffe24f2fa26343bb640589d.pngbin0 -> 267 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_1e2d2698dea0c4c10e5adec4bd7ff70e73187667.pngbin0 -> 855 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_1fc37717e258a1a5fb8122b1b382dda56586bff0.pngbin0 -> 212 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_20246aa326fa6d81ef34a8e682ecfac6ba896626.pngbin0 -> 515 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_20e606daa43c396e63a2e8fc26725b5da41a14c5.pngbin0 -> 3203 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_295788ecb2dfe85a0ee4ad55e9b86789474a4b3b.pngbin0 -> 203 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_29aa318f59466d5147dddf8274a9573a599c5881.pngbin0 -> 1743 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_2b8bfed6caf467a39c0011078c0682e4bc8b01d8.pngbin0 -> 659 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_2bdf24555f2e4da52b85f85661e0c40d3735c3a7.pngbin0 -> 375 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_2c305db608ae9189e38d5732b8b0631c0b26f2cf.pngbin0 -> 292 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_30f1f211dabcbf7494e272f128b5f16fe941ac9b.pngbin0 -> 745 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_31e08417e971a381dcb478b045e2a2f22bd4a8bd.pngbin0 -> 1890 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_3562e1a7b73f70d6a0ffd3a0651567603a749685.pngbin0 -> 852 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_38de796c8cb5b9d82c9f665a2d8e8961fde2a8fd.pngbin0 -> 4048 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_44c69b98f29fd4c734fbd16d59afe39c7bcecb7b.pngbin0 -> 282 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_469f2f6c88424f67439b94a50196f8ba1bba4e75.pngbin0 -> 1861 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_482ce1a53d267077a7913721472c3fda3d23676b.pngbin0 -> 1107 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_4aad37fd86fd67c60dd626df7ea617d57d7b3da8.pngbin0 -> 353 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_4bc773f31ca8574962929b40c685593e6977bedf.pngbin0 -> 5099 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_4cccf7bcc31e4a87b7cc7dc670d8ae2a6c4d2fee.pngbin0 -> 1050 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_5403614eabaee483170d9a5e6062b7bee0cafadc.pngbin0 -> 239 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_553161e247d3031a33fd687c4c0b1bdd51d70ed5.pngbin0 -> 511 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_5676823d2bebac70bf707a8cb5fe565237e62d4b.pngbin0 -> 1005 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_56a19e07469a87327c52f525acf0be4894b018e3.pngbin0 -> 308 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_56ecbcc589cdc971ed842308137af3eef45236f7.pngbin0 -> 268 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_5841f4eeff6285bb9e5870b54179fae01a43fdb1.pngbin0 -> 2977 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_5e59727ac74fb425c4d90af11badddcf06074eaa.pngbin0 -> 633 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_5fc705ae3cda80a1fe23680319883a0900997a95.pngbin0 -> 381 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_60c069f6e8f9c188906f42d365134bdb6d4d3f15.pngbin0 -> 240 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_645b65b1caa4399531bca92bbc21b3347ae037e8.pngbin0 -> 528 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_6cb0ade4fabecc0fbf94b27a8303aada1432e6b6.pngbin0 -> 2439 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_6d2976e18281a74e7b860e843a09c29646f5d229.pngbin0 -> 578 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_7348c937ad8aab68a65efff86b0635dd6a2aacfb.pngbin0 -> 1148 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_777fdccbc2bdca9d0c867fd944388c903da9a588.pngbin0 -> 2714 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_7e579f4741f7343d3cd84d96870af3d9c21ca6c4.pngbin0 -> 283 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_86339852caf85d6376cbe2749f2dfac5d7a227fb.pngbin0 -> 227 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_8ba751cfc7bb2517203a13346fdb1100105ec041.pngbin0 -> 197 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_8d70aba826bdd60196e768954570e9f0254a536e.pngbin0 -> 224 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_8e6dd6124b1d7effa074a865b0f84273b4f85983.pngbin0 -> 727 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_8f5dabcf1815e812f885194fc657fb42a6cf444a.pngbin0 -> 403 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_905429a431562d9680086dc38822e7efe287dc28.pngbin0 -> 327 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_93a5be4976a91b4020f15567c696528bb2dbf3e9.pngbin0 -> 5666 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_93b7fe4c1c202f4d27115b2e88d32dbf0f3f4bcd.pngbin0 -> 526 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_9a478aab139b8ddc731bf1fec4e4613df0df79d7.pngbin0 -> 574 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_9a810bc7ae6f68f67f569c635c9273d3b32d66f8.pngbin0 -> 255 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_9aeb09fef74f1b7fa75c919ed52232614252f100.pngbin0 -> 373 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_a175f7991f67abafdcc808340f3c6c1a098fc265.pngbin0 -> 390 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_a5d74ba51edca089a8fe9aa5e980c7727fd3a42e.pngbin0 -> 410 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_ac24fcf78627fc23c707ca03b4d5f60ab6e74727.pngbin0 -> 381 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_b0af795cc56e60a36200f5fbf1dfa59219b4e8f9.pngbin0 -> 232 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_b3af65180e3da76e79af9cead0a954f50f1e5a63.pngbin0 -> 419 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_bb42fe83b837636ec90ae95b1e55b2c2fc0be2d0.pngbin0 -> 4962 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_bbb4f0e7fd50f880081040248db0d440e0c2ebe6.pngbin0 -> 248 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_bcc7c3c7fcfe4e6d5d7c558ac2620b4542f1e104.pngbin0 -> 264 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_bdc57492100df64fe4cc24595cae815da48521b4.pngbin0 -> 367 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_c3e864f24ea34467f77a81cc938f6d1849638f56.pngbin0 -> 291 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_c6d8d5bac4a264496b55175e3ada4d4f606e1daa.pngbin0 -> 192 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_c7b3d44d92e31d483548ec1fa32b32b2fc17f790.pngbin0 -> 358 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_c7bb0452228bb7ae478b62bfa8cb548848d45f0a.pngbin0 -> 276 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_c8dcdd752c02da9d0acd68e989882372affb728e.pngbin0 -> 203 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_c97aba6022e3378183947009cf5e0cefb418343b.pngbin0 -> 236 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_cc988de601ac0c69b4f3abac866f49d08ddf1d2e.pngbin0 -> 1581 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_ccd977257f0357f8503d1efb71af53da5e729e83.pngbin0 -> 286 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_cefa3c101acf9a70a23e370b69000463222e7789.pngbin0 -> 277 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_cf4a24b9d8df90a4207409251619b626e2ba9094.pngbin0 -> 220 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_d15f7ca5c6030a94dacd46c93fd0e94e9f0d947b.pngbin0 -> 233 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_d47a89ea653efb65247bfc960f6a120f54ffca4c.pngbin0 -> 413 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_d6703c91e06f0a04306731af1e0f2ce70b562c71.pngbin0 -> 797 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_d6de69b8388be36c162808c4a5f51ab58c16c0b7.pngbin0 -> 171 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_d802b30008f41a27eb1011216fe26ea2d9cba319.pngbin0 -> 1923 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_dcf704ba58b94b559281482e631f1aeebd2ffe49.pngbin0 -> 307 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_dd07dfe07ed52bf8ba48d0a066c1167236bc17b8.pngbin0 -> 934 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_ddbf06131042ba626ee1ae7306b04bf03cd8d9e5.pngbin0 -> 915 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_de0c441da7e2b9392f72ad49067b736eae277965.pngbin0 -> 694 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_e241ff7de79261c989e770756e3b375a1eb9b5fb.pngbin0 -> 4585 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_e4f84adc76b732b1e415ff83066405a2a7b37ca2.pngbin0 -> 478 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_ec62e6507bce132c855ac34379f0bd421817f7ad.pngbin0 -> 191 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_f3f8a0272fdf2f1a6dacd4988a1d9155cb39dfd4.pngbin0 -> 465 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_f454ef5d05d58524a2fe56f90be0c9b57505bb89.pngbin0 -> 458 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_f47339c36b13464574d33be9dc09f4ca75d59416.pngbin0 -> 264 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_f49db2c7552ff681019e79e48c0ca5ff12444913.pngbin0 -> 267 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_fd348f488755a9e62d4e37719a6288db4d1595b2.pngbin0 -> 255 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_fd6b88645cfc867990de910bc1a157d3407ac392.pngbin0 -> 1069 bytes
-rw-r--r--mindmap/ltximg/org-ltximg_ffe2366f81d8415001eae71a23309b1968a1685c.pngbin0 -> 320 bytes
-rw-r--r--style.css4
93 files changed, 650 insertions, 3 deletions
diff --git a/config/emacs.el b/config/emacs.el
new file mode 100644
index 0000000..eb492ad
--- /dev/null
+++ b/config/emacs.el
@@ -0,0 +1,289 @@
+(display-battery-mode 1)
+(setq display-time-24hr-format t)
+(display-time-mode 1)
+(menu-bar-mode -1)
+(scroll-bar-mode -1)
+(tool-bar-mode -1)
+(load-theme 'catppuccin :no-confirm)
+(add-hook 'prog-mode-hook #'display-line-numbers-mode)
+(set-face-attribute 'default nil :height 120)
+(setq use-short-answers t)
+(setq make-backup-files nil)
+(setq org-export-with-broken-links t)
+(setq org-src-fontify-natively t)
+
+(set-frame-parameter nil 'alpha-background 90)
+(add-to-list 'default-frame-alist '(alpha-background . 90))
+
+(setq mouse-wheel-scroll-amount '(1 ((shift) . 1)))
+(setq mouse-wheel-progressive-speed nil)
+(setq mouse-wheel-follow-mouse 't)
+(setq scroll-step 1)
+
+(require 'org-habit)
+(setq org-agenda-files (list "~/org/agenda.org"
+ "~/org/notes.org"))
+(setq org-default-notes-file (concat org-directory "/notes.org"))
+(setq org-habit-preceding-days 1)
+
+(require 'ox-publish)
+(setq org-publish-project-alist
+ '(("website-org"
+ :base-directory "~/org/website"
+ :base-extension "org"
+ :publishing-directory "~/website_html"
+ :recursive t
+ :publishing-function org-html-publish-to-html
+ :headline-levels 4
+ :html-preamble t
+ :html-preamble-format (("en" "<p class=\"preamble\"><a href=\"/index.html\">home</a> | <a href=\"./index.html\">section main page</a></p><hr>")))
+ ("website-static"
+ :base-directory "~/org/website"
+ :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico"
+ :publishing-directory "~/website_html/"
+ :recursive t
+ :publishing-function org-publish-attachment)
+ ("website" :auto-sitemap t :components ("website-org" "website-static"))))
+;; (setq org-export-html-postamble-format '(("en" "<p class=\"preamble\"><a href=\"../index.html\">previous page</a> | <a href=\"/index.html\">home</a></p>")))
+(setq org-html-postamble "Copyright © 2024 Preston Pan")
+
+;;(add-hook 'org-mode-hook (lambda ()
+;; (setq-local electric-pair-inhibit-predicate
+;; `(lambda (c)
+;; (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c))))))
+;;(add-hook 'prog-mode-hook (lambda () (electric-pair-mode 1)))
+
+(add-hook 'after-init-hook 'global-company-mode)
+
+(org-babel-do-load-languages 'org-babel-load-languages
+ '(
+ (shell . t)
+ )
+)
+
+(require 'org-tempo)
+(use-package evil
+ :init
+ (setq evil-want-keybinding nil)
+ :config
+ (evil-mode 1)
+ (evil-set-undo-system 'undo-redo))
+(use-package evil-collection
+ :init
+ (setq evil-want-keybinding nil)
+ :config
+ (evil-collection-init))
+(with-eval-after-load 'evil-maps
+(define-key evil-motion-state-map (kbd "SPC") nil)
+(define-key evil-motion-state-map (kbd "RET") nil)
+(define-key evil-motion-state-map (kbd "TAB") nil))
+(use-package evil-commentary
+ :config
+ (evil-commentary-mode))
+(use-package evil-org
+ :after org
+ :hook (org-mode . (lambda () evil-org-mode))
+ :config
+ (require 'evil-org-agenda)
+ (evil-org-agenda-set-keys))
+
+(use-package which-key
+ :config
+ (which-key-mode))
+(use-package page-break-lines
+ :init
+ (page-break-lines-mode))
+
+(use-package org-journal
+ :init
+ (setq org-journal-dir "~/org/website/journal/")
+ (setq org-journal-date-format "%A, %d %B %Y")
+
+ (defun org-journal-file-header-func (time)
+ "Custom function to create journal header."
+ (concat
+ (pcase org-journal-file-type
+ (`daily "#+TITLE: Daily Journal\n#+STARTUP: showeverything\n#+DESCRIPTION: My daily journal entry\n#+AUTHOR: Preston Pan\n#+HTML_HEAD: <link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\" />\n#+html_head: <script src=\"https://polyfill.io/v3/polyfill.min.js?features=es6\"></script>\n#+html_head: <script id=\"MathJax-script\" async src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js\"></script>\n#+options: broken-links:t")
+ (`weekly "#+TITLE: Weekly Journal\n#+STARTUP: folded")
+ (`monthly "#+TITLE: Monthly Journal\n#+STARTUP: folded")
+ (`yearly "#+TITLE: Yearly Journal\n#+STARTUP: folded"))))
+
+ (setq org-journal-file-header 'org-journal-file-header-func)
+ (setq org-journal-file-format "%Y%m%d.org")
+ (setq org-journal-enable-agenda-integration t)
+)
+
+(use-package doom-modeline
+:config
+(doom-modeline-mode 1))
+
+(use-package org-superstar
+:config
+(add-hook 'org-mode-hook (lambda () (org-superstar-mode 1))))
+
+(use-package eglot
+ :config
+ (add-hook 'prog-mode-hook 'eglot-ensure))
+
+(use-package dashboard
+ :init
+ (setq dashboard-banner-logo-title "Welcome, Commander!")
+ (setq dashboard-icon-type 'nerd-icons)
+ (setq dashboard-vertically-center-content t)
+ (setq dashboard-set-init-info t)
+ (setq dashboard-week-agenda t)
+ (setq dashboard-items '((recents . 5)
+ (bookmarks . 5)
+ (projects . 5)
+ (agenda . 5)
+ (registers . 5)))
+ :config
+ (dashboard-setup-startup-hook))
+
+(use-package projectile
+ :config
+ (projectile-mode +1))
+
+(use-package counsel)
+(use-package ivy
+ :init
+ (setq ivy-use-virtual-buffers t)
+ (setq enable-recursive-minibuffers t)
+ ;; enable this if you want `swiper' to use it
+ ;; (setq search-default-mode #'char-fold-to-regexp)
+ (global-set-key "\C-s" 'swiper)
+ (global-set-key (kbd "C-c C-r") 'ivy-resume)
+ (global-set-key (kbd "<f6>") 'ivy-resume)
+ (global-set-key (kbd "M-x") 'counsel-M-x)
+ (global-set-key (kbd "C-x C-f") 'counsel-find-file)
+ (global-set-key (kbd "<f1> f") 'counsel-describe-function)
+ (global-set-key (kbd "<f1> v") 'counsel-describe-variable)
+ (global-set-key (kbd "<f1> o") 'counsel-describe-symbol)
+ (global-set-key (kbd "<f1> l") 'counsel-find-library)
+ (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
+ (global-set-key (kbd "<f2> u") 'counsel-unicode-char)
+ (global-set-key (kbd "C-c g") 'counsel-git)
+ (global-set-key (kbd "C-c j") 'counsel-git-grep)
+ (global-set-key (kbd "C-c k") 'counsel-ag)
+ (global-set-key (kbd "C-x l") 'counsel-locate)
+ (global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
+ (define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
+ :config
+ (ivy-mode))
+
+(use-package magit)
+
+(use-package general
+ :config
+ (general-create-definer leader-key
+ :prefix "SPC")
+ (leader-key 'normal
+ "o a" 'org-agenda
+ "c b" 'counsel-bookmark
+ "o c" 'org-capture
+ "n j j" 'org-journal-new-entry
+ "n r f" 'org-roam-node-find
+ "n r i" 'org-roam-node-insert
+ "n r g" 'org-roam-graph
+ "r s s" 'elfeed
+ "." 'counsel-find-file
+ "g c /" 'magit-dispatch
+ "g c c" 'magit-commit
+ "o t" 'vterm-other-window
+ "o e" 'eshell
+ "o m" 'mu4e
+ "e w" 'eww
+ "p w" 'ivy-pass
+ "m P p" 'org-publish
+ "h m" '(woman :wk "Manual")
+ "h r r" '(lambda () (load-file "~/org/website/config/config.el"))
+ ))
+
+(use-package elfeed
+ :init
+ (add-hook 'elfeed-search-mode-hook #'elfeed-update)
+ (setq elfeed-search-filter "@1-month-ago +unread")
+ )
+(use-package elfeed-org
+ :init
+ (setq rmh-elfeed-org-files '("~/org/website/config/elfeed.org"))
+ :config
+ (elfeed-org))
+
+(setq search-engines
+ '(
+ (("google" "g") "https://google.com/search?q=%s")
+ (("duckduckgo" "d" "ddg") "https://duckduckgo.com/?q=%s")
+ (("rfc" "r") "https://www.rfc-editor.org/rfc/rfc%s.txt")
+ (("rfc-kw" "rk") "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s")))
+
+(setq search-engine-default "google")
+(setq eww-search-prefix "https://google.com/search?q=")
+(setq browse-url-secondary-browser-function 'browse-url-generic browse-url-generic-program "firefox")
+(setq browse-url-browser-function 'eww-browse-url)
+(add-hook 'eww-mode-hook
+ (lambda () (local-set-key (kbd "y Y") #'eww-copy-page-url)))
+
+(use-package org-roam
+ :init
+ (setq org-roam-graph-viewer "firefox")
+ (setq org-roam-directory (file-truename "~/org/website/mindmap"))
+ (setq org-roam-capture-templates '(("d" "default" plain "%?"
+ :target (file+head "${title}.org"
+ "#+title: ${title}\n#+author: Preston Pan\n#+html_head: <link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\" />\n#+html_head: <script src=\"https://polyfill.io/v3/polyfill.min.js?features=es6\"></script>\n#+html_head: <script id=\"MathJax-script\" async src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js\"></script>\n#+options: broken-links:t")
+ :unnarrowed t))))
+
+(use-package pinentry
+ :init (setq epa-pinentry-mode `loopback)
+ :config (pinentry-start))
+
+(setq TeX-PDF-mode t)
+(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5))
+(setq org-return-follows-link t)
+
+;; SMTP settings:
+(setq user-mail-address "preston@nullring.xyz")
+(setq user-full-name "Preston Pan")
+(setq sendmail-program "msmtp"
+ send-mail-function 'smtpmail-send-it
+ message-sendmail-f-is-evil t
+ message-sendmail-extra-arguments '("--read-envelope-from")
+ message-send-mail-function 'message-send-mail-with-sendmail)
+
+(require 'smtpmail)
+(use-package mu4e
+ :init
+ (setq mu4e-drafts-folder "/Drafts")
+ (setq mu4e-sent-folder "/Sent")
+ (setq mu4e-trash-folder "/Trash")
+ (setq mu4e-attachment-dir "~/Downloads")
+ (setq mu4e-view-show-addresses 't)
+ (setq mu4e-confirm-quit nil)
+
+
+ (setq message-kill-buffer-on-exit t)
+ (setq mu4e-compose-dont-reply-to-self t)
+ (setq mu4e-change-filenames-when-moving t)
+ (setq mu4e-get-mail-command "mbsync prestonpan")
+ (setq mu4e-compose-reply-ignore-address '("no-?reply" "preston@nullring.xyz"))
+ (setq mu4e-html2text-command "w3m -T text/html" ; how to hanfle html-formatted emails
+ mu4e-update-interval 300 ; seconds between each mail retrieval
+ mu4e-headers-auto-update t ; avoid to type `g' to update
+ mu4e-view-show-images t ; show images in the view buffer
+ mu4e-compose-signature-auto-include nil ; I don't want a message signature
+ mu4e-use-fancy-chars t))
+
+(use-package ivy-pass)
+
+(use-package emms
+ :init
+ (emms-all)
+ (setq emms-source-file-default-directory (expand-file-name "~/music/"))
+ (setq emms-player-mpd-music-directory "~/music/")
+ (setq emms-player-mpd-server-name "localhost")
+ (setq emms-player-mpd-server-port "6600")
+ (setq emms-player-list '(emms-player-mpd))
+ (add-to-list 'emms-info-functions 'emms-info-mpd)
+ (add-to-list 'emms-player-list 'emms-player-mpd)
+:config
+ (emms-player-mpd-connect))
diff --git a/config/emacs.org b/config/emacs.org
new file mode 100644
index 0000000..c1d208e
--- /dev/null
+++ b/config/emacs.org
@@ -0,0 +1,346 @@
+#+TITLE: Emacs Configuration
+#+AUTHOR: Preston Pan
+#+DESCRIPTION: my personal emacs configuration for nixOS
+* Introduction
+** UI Elements
+#+begin_src emacs-lisp
+ (display-battery-mode 1)
+ (setq display-time-24hr-format t)
+ (display-time-mode 1)
+ (menu-bar-mode -1)
+ (scroll-bar-mode -1)
+ (tool-bar-mode -1)
+ (load-theme 'catppuccin :no-confirm)
+ (add-hook 'prog-mode-hook #'display-line-numbers-mode)
+ (set-face-attribute 'default nil :height 120)
+ (setq use-short-answers t)
+ (setq make-backup-files nil)
+ (setq org-export-with-broken-links t)
+ (setq org-src-fontify-natively t)
+#+end_src
+* Transparency
+#+begin_src emacs-lisp
+ (set-frame-parameter nil 'alpha-background 90)
+ (add-to-list 'default-frame-alist '(alpha-background . 90))
+#+end_src
+* Scrolling
+#+begin_src emacs-lisp
+ (setq mouse-wheel-scroll-amount '(1 ((shift) . 1)))
+ (setq mouse-wheel-progressive-speed nil)
+ (setq mouse-wheel-follow-mouse 't)
+ (setq scroll-step 1)
+#+end_src
+* Agenda
+#+begin_src emacs-lisp
+ (require 'org-habit)
+ (setq org-agenda-files (list "~/org/agenda.org"
+ "~/org/notes.org"))
+ (setq org-default-notes-file (concat org-directory "/notes.org"))
+ (setq org-habit-preceding-days 1)
+#+end_src
+* Publishing
+#+begin_src emacs-lisp
+ (require 'ox-publish)
+ (setq org-publish-project-alist
+ '(("website-org"
+ :base-directory "~/org/website"
+ :base-extension "org"
+ :publishing-directory "~/website_html"
+ :recursive t
+ :publishing-function org-html-publish-to-html
+ :headline-levels 4
+ :html-preamble t
+ :html-preamble-format (("en" "<p class=\"preamble\"><a href=\"/index.html\">home</a> | <a href=\"./index.html\">section main page</a></p><hr>")))
+ ("website-static"
+ :base-directory "~/org/website"
+ :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico"
+ :publishing-directory "~/website_html/"
+ :recursive t
+ :publishing-function org-publish-attachment)
+ ("website" :auto-sitemap t :components ("website-org" "website-static"))))
+ ;; (setq org-export-html-postamble-format '(("en" "<p class=\"preamble\"><a href=\"../index.html\">previous page</a> | <a href=\"/index.html\">home</a></p>")))
+ (setq org-html-postamble "Copyright © 2024 Preston Pan")
+#+end_src
+* Autopair
+#+begin_src emacs-lisp
+ ;;(add-hook 'org-mode-hook (lambda ()
+ ;; (setq-local electric-pair-inhibit-predicate
+ ;; `(lambda (c)
+ ;; (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c))))))
+ ;;(add-hook 'prog-mode-hook (lambda () (electric-pair-mode 1)))
+#+end_src
+* Completion
+#+begin_src emacs-lisp
+ (add-hook 'after-init-hook 'global-company-mode)
+#+end_src
+* Org Babel
+#+begin_src emacs-lisp
+(org-babel-do-load-languages 'org-babel-load-languages
+ '(
+ (shell . t)
+ )
+)
+#+end_src
+* Packages
+#+begin_src emacs-lisp
+ (require 'org-tempo)
+ (use-package evil
+ :init
+ (setq evil-want-keybinding nil)
+ :config
+ (evil-mode 1)
+ (evil-set-undo-system 'undo-redo))
+ (use-package evil-collection
+ :init
+ (setq evil-want-keybinding nil)
+ :config
+ (evil-collection-init))
+ (with-eval-after-load 'evil-maps
+ (define-key evil-motion-state-map (kbd "SPC") nil)
+ (define-key evil-motion-state-map (kbd "RET") nil)
+ (define-key evil-motion-state-map (kbd "TAB") nil))
+ (use-package evil-commentary
+ :config
+ (evil-commentary-mode))
+ (use-package evil-org
+ :after org
+ :hook (org-mode . (lambda () evil-org-mode))
+ :config
+ (require 'evil-org-agenda)
+ (evil-org-agenda-set-keys))
+
+ (use-package which-key
+ :config
+ (which-key-mode))
+ (use-package page-break-lines
+ :init
+ (page-break-lines-mode))
+#+end_src
+** Journal
+#+begin_src emacs-lisp
+ (use-package org-journal
+ :init
+ (setq org-journal-dir "~/org/website/journal/")
+ (setq org-journal-date-format "%A, %d %B %Y")
+
+ (defun org-journal-file-header-func (time)
+ "Custom function to create journal header."
+ (concat
+ (pcase org-journal-file-type
+ (`daily "#+TITLE: Daily Journal\n#+STARTUP: showeverything\n#+DESCRIPTION: My daily journal entry\n#+AUTHOR: Preston Pan\n#+HTML_HEAD: <link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\" />\n#+html_head: <script src=\"https://polyfill.io/v3/polyfill.min.js?features=es6\"></script>\n#+html_head: <script id=\"MathJax-script\" async src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js\"></script>\n#+options: broken-links:t")
+ (`weekly "#+TITLE: Weekly Journal\n#+STARTUP: folded")
+ (`monthly "#+TITLE: Monthly Journal\n#+STARTUP: folded")
+ (`yearly "#+TITLE: Yearly Journal\n#+STARTUP: folded"))))
+
+ (setq org-journal-file-header 'org-journal-file-header-func)
+ (setq org-journal-file-format "%Y%m%d.org")
+ (setq org-journal-enable-agenda-integration t)
+ )
+#+end_src
+** Doom Modeline
+#+begin_src emacs-lisp
+ (use-package doom-modeline
+ :config
+ (doom-modeline-mode 1))
+#+end_src
+** Make Org Look Better
+#+begin_src emacs-lisp
+ (use-package org-superstar
+ :config
+ (add-hook 'org-mode-hook (lambda () (org-superstar-mode 1))))
+#+end_src
+** LSP
+#+begin_src emacs-lisp
+ (use-package eglot
+ :config
+ (add-hook 'prog-mode-hook 'eglot-ensure))
+#+end_src
+** Dashboard
+#+begin_src emacs-lisp
+ (use-package dashboard
+ :init
+ (setq dashboard-banner-logo-title "Welcome, Commander!")
+ (setq dashboard-icon-type 'nerd-icons)
+ (setq dashboard-vertically-center-content t)
+ (setq dashboard-set-init-info t)
+ (setq dashboard-week-agenda t)
+ (setq dashboard-items '((recents . 5)
+ (bookmarks . 5)
+ (projects . 5)
+ (agenda . 5)
+ (registers . 5)))
+ :config
+ (dashboard-setup-startup-hook))
+#+end_src
+** Projectile
+#+begin_src emacs-lisp
+ (use-package projectile
+ :config
+ (projectile-mode +1))
+#+end_src
+** Ivy
+#+begin_src emacs-lisp
+ (use-package counsel)
+ (use-package ivy
+ :init
+ (setq ivy-use-virtual-buffers t)
+ (setq enable-recursive-minibuffers t)
+ ;; enable this if you want `swiper' to use it
+ ;; (setq search-default-mode #'char-fold-to-regexp)
+ (global-set-key "\C-s" 'swiper)
+ (global-set-key (kbd "C-c C-r") 'ivy-resume)
+ (global-set-key (kbd "<f6>") 'ivy-resume)
+ (global-set-key (kbd "M-x") 'counsel-M-x)
+ (global-set-key (kbd "C-x C-f") 'counsel-find-file)
+ (global-set-key (kbd "<f1> f") 'counsel-describe-function)
+ (global-set-key (kbd "<f1> v") 'counsel-describe-variable)
+ (global-set-key (kbd "<f1> o") 'counsel-describe-symbol)
+ (global-set-key (kbd "<f1> l") 'counsel-find-library)
+ (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
+ (global-set-key (kbd "<f2> u") 'counsel-unicode-char)
+ (global-set-key (kbd "C-c g") 'counsel-git)
+ (global-set-key (kbd "C-c j") 'counsel-git-grep)
+ (global-set-key (kbd "C-c k") 'counsel-ag)
+ (global-set-key (kbd "C-x l") 'counsel-locate)
+ (global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
+ (define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
+ :config
+ (ivy-mode))
+#+end_src
+** Magit
+#+begin_src emacs-lisp
+(use-package magit)
+#+end_src
+** Keybindings
+#+begin_src emacs-lisp
+ (use-package general
+ :config
+ (general-create-definer leader-key
+ :prefix "SPC")
+ (leader-key 'normal
+ "o a" 'org-agenda
+ "c b" 'counsel-bookmark