diff options
author | colin <colin@cicadas.surf> | 2025-03-25 05:54:40 -0400 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2025-03-25 05:54:40 -0400 |
commit | 979a686ae785f87ef09d09480a22517fdffc35a6 (patch) | |
tree | 2978a87736d629faa6a599858d07a193b73c9d4f /init-el.org | |
parent | ab38fa5bcfa9c0edbb42382c5b113328f9fc4e50 (diff) |
font change; cal config; nicewrite, feeds, capture, latex unicode
Diffstat (limited to 'init-el.org')
-rw-r--r-- | init-el.org | 172 |
1 files changed, 107 insertions, 65 deletions
diff --git a/init-el.org b/init-el.org index 42214db..c0304cd 100644 --- a/init-el.org +++ b/init-el.org @@ -377,9 +377,9 @@ again, if it was whent he org edit src buffer was opened." (message ";;; FONTS") (add-to-list 'default-frame-alist - '(font . "DejaVu Sans Mono-10") - ;'(font . "Comic Mono-11") - ;'(font . "Victor Mono-10") ;; uhh + ; '(font . "DejaVu Sans Mono-10") + '(font . "Comic Mono-11") + ;'(font . "Victor Mono-10") ) @@ -631,15 +631,16 @@ LOAD-THEME" (defun my-theme-cycler () (interactive) (let ((still-cycling t)) - (message (format "%s [n]ext or [p]revious. Anything else to quit." + (message (format "%s [n]ext or [p]revious. [r] for random. Anything else to quit." (my-theme-string))) (while still-cycling (let ((char (read-key))) (cond ((eq char ?n) (my-theme-command-next)) ((eq char ?p) (my-theme-command-previous)) + ((eq char ?r) (my-random-theme)) (t (setq still-cycling nil)))) - (message (format "%s [n]ext or [p]revious. Anything else to quit." + (message (format "%s [n]ext or [p]revious. [r] for random. Anything else to quit." (my-theme-string)))))) (defun my-theme-command-next () @@ -666,6 +667,13 @@ LOAD-THEME" (setq cursor-type 'box) (setq-default cursor-type 'box))) +(defun my-random-theme () + (interactive) + (when custom-enabled-themes + (disable-theme (car custom-enabled-themes))) + (load-theme (nth (random (length *theme-pool*)) *theme-pool*) t) + (setq cursor-type 'box) + (setq-default cursor-type 'box)) #+end_src *** Installed Themes @@ -679,16 +687,17 @@ LOAD-THEME" (package-install 'autothemer) ;; for custom themes (setq my-installed-themes - '( - ef-themes - plan9-theme + '(plan9-theme poet-theme yoshi-theme naga-theme + pastelmac-theme grandshell-theme - leuven-theme seoul256-theme - )) + base16-theme + doom-themes + kaolin-themes + monokai-pro-theme)) (dolist (package my-installed-themes) (when (not (package-installed-p package)) @@ -716,25 +725,30 @@ coding in.") "This is a modal theme set variable, toggles between writing and coding themese. I set whichever themeset I feel like writing in.") +(defvar *theme-pool* nil + "Themes to select from at random.") + (setq *singular-themes* '( ;; light leuven + pastelmac plan9 ;; medium seoul256 yoshi - leuven-dark ;; dark grandshell naga)) -(setq *ef-themes* (themes-in-package 'ef)) - -(setf *coding-themes* (append *singular-themes* *ef-themes*)) - +(setf *coding-themes* *singular-themes*) (setq *writing-themes* (themes-in-package 'poet)) +(setf *theme-pool* (append (themes-in-package 'base16) + ;(themes-in-package 'doom) + (themes-in-package 'kaolin) + )) + (setq *current-theme-set* *coding-themes*) (when (car custom-enabled-themes) (disable-theme (car custom-enabled-themes))) @@ -788,7 +802,7 @@ stand up and move around. #+name: calfw-org-config #+begin_src elisp :noweb no-export :results none - +;; ;;; CALENDAR (message ";;; CALENDAR") @@ -800,8 +814,8 @@ stand up and move around. (custom-set-variables '(cfw:org-capture-template '("c" "Calendar" entry - (file+headline "~/notes/deft/project-Planner.org" "CALENDAR") - "* %?\n %(cfg:org-capture-day)"))) + (file+headline "~/notes/deft/Planner.org" "CALENDAR") + "* %?\n %(cfw:org-capture-day)"))) #+end_src @@ -814,7 +828,7 @@ stand up and move around. ;;; ORG REFILE (message ";;; ORG REFILE") -(setq my-org-refile-directory "~/notes/deft/") +(setq my-org-refile-directory "~/notes/denote/") (defun my-org-refile-targets () (loop for fname in (directory-files my-org-refile-directory) @@ -837,16 +851,19 @@ stand up and move around. ;;; ORG CAPTURE (message ";;; ORG CAPTURE") -(with-eval-after-load 'org-capture - (add-to-list 'org-capture-templates - '("j" "Journal" entry - (file+olp+datetree "~/notes/circadian.org.cpt") - "")) - (add-to-list 'org-capture-templates - '("i" "Inbox" entry - (file+headline "~/notes/deft/Planner.org" "INBOX") - ""))) - +(add-to-list 'org-capture-templates + '("j" "Journal" entry + (file+olp+datetree "~/notes/circadian.org.cpt") + "")) +(add-to-list 'org-capture-templates + '("i" "Inbox" entry + (file+headline "~/notes/deft/Planner.org" "INBOX") + "")) + +(add-to-list 'org-capture-templates + '("c" "Calendar" entry + (file+headline "~/notes/deft/Planner.org" "CALENDAR") + "* %?\n %(cfw:org-capture-day)")) #+end_src ** Org Agenda @@ -1010,7 +1027,10 @@ imenu-list displayes imenu results in a a navigable table-of-contents tree-like (setq elfeed-feeds '(("https://harpers.org/feed" culture politics news) - ("https://scottaaronson.blog/?feed=rss2" quantum blog science) + ("https://nebraskaexaminer.com/feed" news nebraska) + ("https://commonwealthbeacon.org/feed" news massachusetts) + ("https://missouriindependent.com/feed" news missouri) + ("https://calmatters.org/feed" news california) ("https://antirez.com/rss" blog) ("https://cdn.jwz.org/blog/feed/" blog) ("https://wingolog.org/feed/atom" blog) @@ -1019,14 +1039,7 @@ imenu-list displayes imenu results in a a navigable table-of-contents tree-like ("https://theconvivialsociety.substack.com/feed" technology culture philosophy) ("https://www.bostonreview.net/topics/philosophy-religion/feed" philosophy) ("https://www.bostonreview.net/topics/class-inequality/feed" politics) - ("https://thepointmag.com/feed/" culture philosophy) - ("https://www.nytimes.com/svc/collections/v1/publish/https://www.nytimes.com/column/learning-word-of-the-day/rss.xml" - wordoday language) - ("http://fetchrss.com/rss/66af99825fdfb35add0f910266af9a03b8d793c4a30fd922.xml" - wordoday language) - ("https://fetchrss.com/rss/66af99825fdfb35add0f910266af995e93a5c7aacb0884d2.xml" - wordoday language) - ("https://www.merriam-webster.com/wotd/feed/rss2" wordoday language))) + ("https://thepointmag.com/feed/" culture philosophy))) (setq-default elfeed-search-filter "@2-weeks-ago +unread") @@ -1083,15 +1096,14 @@ imenu-list displayes imenu results in a a navigable table-of-contents tree-like (custom-set-variables '(denote-directory "~/notes/denote/" 'now)) -(with-eval-after-load 'org-capture - (add-to-list 'org-capture-templates - '("d" "Denote" plain - (file denote-last-path) - #'denote-org-capture - :no-save t - :immediate-finish nil - :kill-buffer t - :jump-to-captured t))) +(add-to-list 'org-capture-templates + '("d" "Denote" plain + (file denote-last-path) + #'denote-org-capture + :no-save t + :immediate-finish nil + :kill-buffer t + :jump-to-captured t)) (defun dired-denote-directory () (interactive) @@ -1120,25 +1132,35 @@ imenu-list displayes imenu results in a a navigable table-of-contents tree-like #+end_src -** Nicerite Mode +** Nicewrite Mode -Nicerite mode isn't a mode at all. It is just setting a margin and +Nicewrite mode isn't a mode at all. It is just setting a margin and setting visual line mode on all org files to make writing org a little nicer. -#+name: nicerite-mode +#+name: nicewrite-mode #+begin_src elisp :noweb no-export -(defun nicerite-hook () - (setq left-margin-width 6) - (setq right-margin-width 6) - (visual-line-mode)) - +(defvar *nicewrite-modes* (list 'org-mode 'markdown-mode)) -(add-hook 'org-mode-hook 'nicerite-hook) +(defun nicewrite (&optional idk) + (when (member major-mode *nicewrite-modes*) + (let* ((margins (window-margins (get-buffer-window))) + (width (+ (or (car margins) 0) + (or (cdr margins) 0) + (window-width))) + (default-m 6) + (default-txt 88) + (margin (max default-m (floor (- width default-txt) 2)))) + (set-window-margins (get-buffer-window) margin margin) + (visual-line-mode)))) +(add-hook 'window-configuration-change-hook 'nicewrite) +(add-hook 'window-state-change-hook 'nicewrite) +(add-hook 'window-size-change-functions 'nicewrite) + #+end_src ** Writeroom @@ -1197,10 +1219,17 @@ characters. (align-regexp (region-beginning) (region-end) "\\(\\s-*\\)\\s-" 1 1 t) (indent-region (region-beginning) (region-end))) +(package-install 'latex-unicode-math-mode) +(require 'latex-unicode-math-mode) +(require 'latex-unicode-mode) + (def-my-command my-special-edit-command - '( - (?i "[i]nsert" my-special-insert) - (?a "[a]lign" my-freaking-align))) + '( + (?l "[l]atex" latex-unicode-mode) + (?i "[i]nsert" my-special-insert) + (?a "[a]lign" my-freaking-align))) + + #+end_src @@ -1365,14 +1394,15 @@ code in emacs org blocks. (setq projectile-project-search-path '("~/projects/")) (setq projectile-indexing-method 'native) (setq org-duration-format 'h:mm) +(add-to-list 'projectile-globally-ignored-directories ".qlot") (def-my-command my-projectile-command - '((?/ "[/] search project" projectile-ag) - (?r "[r]eplace in project" projectile-replace) - (?b "project [b]uffers" projectile-ibuffer) - (?o "[o]pen a project" projectile-switch-project) - (?g "ma[g]it" magit-status) - (?j "[j]ump to file" projectile-find-file-dwim))) + '((?/ "[/] search project" projectile-ag) + (?r "[r]eplace in project" projectile-replace) + (?b "project [b]uffers" projectile-ibuffer) + (?o "[o]pen a project" projectile-switch-project) + (?g "ma[g]it" magit-status) + (?j "[j]ump to file" projectile-find-file-dwim))) #+end_src ** Shell Config @@ -1444,6 +1474,9 @@ association one shell with each perspective layout (?s "[s]ticker dwim" sly-stickers-dwim) (?r "[r]eplay stickers" sly-stickers-replay) (?f "[f]orget stickers" sly-stickers-forget) + (?w "[w]ho calls" sly-who-references) + (?> "[>] calees" sly-list-callees) + (?< "[<] callers" sly-list-callers) (?\t "TAB inpsect" sly-inspect))) (setq sly-lisp-implementations @@ -1477,6 +1510,7 @@ association one shell with each perspective layout (add-hook 'lisp-mode-hook #'enable-paredit-mode) (add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode) (add-hook 'scheme-mode-hook #'enable-paredit-mode) +(add-hook 'lisp-mode-hook #'hl-line-mode) (defun space-for-delimiter-after-$-p (delimiter endp) (not (char-equal ?$ (char-before (point))))) @@ -1732,3 +1766,11 @@ Saves to a temp file and puts the filename in the kill ring." #+end_src +* done loading + + +#+name: done +#+begin_src elisp :noweb no-export + +(message "EVERYTHING LOADED!") +#+end_src |