diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..72b7b3f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,53 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Repository Purpose + +Personal dotfiles repository for Shawn Borton's development environment. Configs for Doom Emacs, Vim, Bash, and tmux — primarily targeting Linux (Arch Linux systems: archie, peregrine) with some historical macOS artifacts. + +## File Overview + +| File | Purpose | +|------|---------| +| `config.el` | Primary Doom Emacs private config (keybindings, UI, packages config) | +| `init.el` | Doom Emacs module selection | +| `packages.el` | Additional Doom Emacs package declarations | +| `.vimrc` | Vim config with vim-plug plugin manager | +| `.bash_profile` | Shell aliases, prompt, NVM setup | +| `.tmux.conf` | tmux keybindings and status bar | + +## Doom Emacs Workflow + +After editing `config.el`, `init.el`, or `packages.el`: + +```bash +doom sync # Sync packages and modules (required after packages.el changes) +doom reload # Reload config without restarting (for config.el/init.el changes) +``` + +## Key Conventions + +**Doom Emacs:** +- Uses Evil mode with `jk` as the escape sequence +- Leader key bindings are defined in `config.el` under `map!` blocks +- Custom packages are declared in `packages.el` using `package!` with optional `:recipe` for git sources +- Modules are toggled in `init.el` with flags like `(python +lsp +pyright +tree-sitter)` +- Fonts: JetBrains Mono (14pt) for fixed-pitch, Overpass Nerd Font (18pt) for variable-pitch +- Theme: `doom-oceanic-next` + +**Vim:** +- Plugin manager: vim-plug (auto-installs to `~/.vim/autoload/plug.vim` on first run) +- Run `:PlugInstall` after adding new plugins to `.vimrc` + +**tmux:** +- Prefix is `C-a` (not the default `C-b`) +- Reload config with `C-a r` + +## Notable Integrations in config.el + +- **Elfeed** (RSS): Connects to a self-hosted Fever API at `rss.onionpatch.cloud`; feeds are tagged and filtered with custom keybindings under the leader key +- **Pocket**: Integrated with elfeed for article saving via `pocket-reader` +- **gptel / chatgpt-shell**: LLM/ChatGPT integration packages declared in `packages.el` +- **org-roam**: Unpinned in `packages.el` for a custom version; roam2 module enabled in `init.el` +- **Dired**: Custom `h`/`l` navigation keys; Thunar integration for GUI file manager diff --git a/config.el b/config.el index 0212cff..f4bc5ea 100644 --- a/config.el +++ b/config.el @@ -30,8 +30,8 @@ window-resize-pixelwise t ) ;;; (setq auth-sources "~/.authinfo.gpg") -(setq auth-sources - '((:source "~/.authinfo.gpg"))) +;;;(setq auth-sources +;;; '((:source "~/.authinfo.gpg"))) (display-time-mode 1) (global-subword-mode 1) @@ -339,8 +339,8 @@ "Select a default filter and update elfeed." (interactive) (let* ((filters - '(("Default - 3 Days" . "@3-days-ago +unread -Sports -Videos") - ("Default - 7 Days" . "@7-days-ago +unread -Sports -Videos") + '(("Default - 3 Days" . "@3-days-ago +unread -Sports -Videos -wait") + ("Default - 7 Days" . "@7-days-ago +unread -Sports -Videos -wait") ("Default with Videos" . "@7-days-ago +unread") ("Primary - 7 Days" . "@7-days-ago +unread +primary") ("Secondary - 7 Days" . "@7-days-ago +unread +secondary") @@ -386,7 +386,7 @@ (interactive) ;; (zen/toggle) (buffer-face-mode) - (linum-mode 0) + ;;(linum-mode 0) (blink-cursor-mode) (visual-line-mode 1) (setq truncate-lines nil @@ -420,7 +420,7 @@ (set-face-attribute (car face) nil :font "Overpass Nerd Font" :weight 'regular :height (cdr face))) ;; Ensure that anything that should be fixed-pitch in Org files appears that way - (set-face-attribute 'org-block unspecified :foreground nil :inherit 'fixed-pitch) + (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch) (set-face-attribute 'org-hide nil :inherit 'fixed-pitch) (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) (set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch)) @@ -433,8 +433,7 @@ ;; (set-face-attribute (car face) nil :font "Source Code Pro" :weight 'regular :height (cdr face))) ;; (set-face-attribute (car face) nil :font "SauceCodePro" :height (cdr face)))) - - +;; AI (after! chatgpt-shell (setq chatgpt-shell-openai-key sbinfo/open-ai-key)) @@ -444,9 +443,23 @@ (setq org-ai-use-auth-source nil) (setq org-ai-openai-api-token sbinfo/open-ai-key)) -(gptel-make-anthropic "Claude" ;Any name you want - :stream t ;Streaming responses - :key (auth-source-search :host "claude.ai")) +(use-package! gptel + :custom + ;;(setq gptel-model "claude-3-7-sonnet-20250219") + (setq gptel-model "claude-sonnet-4-20250514") + :config + (defun gptel-add-key () + "Read API key from file and ensure it's clean." + (string-trim + (with-temp-buffer + (insert-file-contents "~/.secrets/claude_key") + (buffer-string)))) + + (setq gptel-backend + (gptel-make-anthropic "Claude" + :stream t + :key #'gptel-add-key))) + ;; (use-package! gptel ;; :config ;; ) @@ -460,7 +473,7 @@ (add-hook 'org-mode-hook #'sbinfo/org-mode-setup) (setq org-directory "~/org/" - org-agenda-files '("agenda.org" "goals_2025.org" "job_search_2022.org") + org-agenda-files '("agenda.org" "goals_2026.org") org-agenda-start-with-follow-mode t org-default-notes-file (expand-file-name "notes.org" org-directory) org-ellipsis " ▼ " @@ -500,7 +513,7 @@ (file "~/org/dalvsedmwcf2025.org") (file "~/org/templates/playoffcapture.orgtmpl") :unnarrowed t) ("hr" "Regular Game" entry - (file "~/org/dallasstars20242025.org") + (file "~/org/dallasstars20252026.org") (file "~/org/templates/regular.orgtmpl") :unnarrowed t) ("i" "IT Request" checkitem (file+headline "~/org/notes.org" "Future IT Requests") @@ -629,3 +642,28 @@ (after! ledger-mode (setq ledger-binary-path "hledger.sh") (setq ledger-default-date-format "%Y-%m-%d")) + +(defun my/org-hugo-link-vanilla-markdown (link desc info) + "Render org links as vanilla Markdown links instead of Hugo relref." + (let* ((type (org-element-property :type link)) + (raw-path (org-element-property :path link)) + (path raw-path)) + (cond + ;; File links - convert to plain markdown + ((string= type "id") + (format "[%s](%s)" (or desc path) path)) + ;; Fuzzy/internal links - convert to anchor links + ((string= type "fuzzy") + (format "[%s](#%s)" (or desc path) + (org-hugo-slug path))) + ;; Default: use original behavior for other link types + (t nil)))) + +(defun my/org-hugo-link-advice (orig-fun link desc info) + "Advice to use vanilla Markdown links." + (or (my/org-hugo-link-vanilla-markdown link desc info) + (funcall orig-fun link desc info))) + +(advice-add 'org-hugo-link :around #'my/org-hugo-link-advice) + +;; (advice-remove 'org-hugo-link #'my/org-hugo-link-advice) diff --git a/init.el b/init.el index fdb03f4..02f366f 100644 --- a/init.el +++ b/init.el @@ -104,7 +104,7 @@ ;;prodigy ; FIXME managing external services & code builders ;;rgb ; creating color strings ;;taskrunner ; taskrunner for all your projects - ;;terraform ; infrastructure as code + terraform ; infrastructure as code ;;tmux ; an API for interacting with tmux tree-sitter ; syntax and parsing, sitting in a tree... ;;upload ; map local to remote projects via ssh/ftp