From 91d04b551c0a1a459dd34d226f64aa1534d22c42 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Fri, 13 Mar 2026 11:00:10 -0400 Subject: [PATCH] [emacs] Add an open shortcut to HR shell --- emacs/.config/doom/config.el | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/emacs/.config/doom/config.el b/emacs/.config/doom/config.el index e2889e1..0b9e3c2 100644 --- a/emacs/.config/doom/config.el +++ b/emacs/.config/doom/config.el @@ -47,6 +47,15 @@ (advice-add 'org-agenda :before #'vulpea-agenda-files-update) (advice-add 'org-todo-list :before #'vulpea-agenda-files-update) +;; Open HR term popup (vterm with hrdjsh) +(defun powellc/open-hr-term () + "Open a vterm popup and run hrdjsh." + (interactive) + (let ((buf (vterm t))) + (pop-to-buffer buf) + (vterm-send-string "hrdjsh\n"))) + + (load! "+django-tests") (map! :after python :map python-mode-map @@ -75,7 +84,9 @@ (:prefix "b" :desc "Black format buffer" "f" #'blacken-buffer :desc "isort buffer" "I" #'py-isort-buffer - :desc "Links in buffer" "l" #'ace-link-org)) + :desc "Links in buffer" "l" #'ace-link-org) + (:prefix "o" + :desc "Open Hungryroot shell" "S" #'powellc/open-hr-term)) (defun unfill-paragraph () "Takes a multi-line paragraph and makes it into a single line of text." @@ -532,16 +543,3 @@ Always open the result in `eww`." (setq agent-shell-google-authentication (agent-shell-google-make-authentication :api-key (lambda () (+pass-line1 "work/hungryroot/apikeys/gemini"))))) - -;;(use-package agent-shell -;; :config -;; ;; Evil state-specific RET behavior: insert mode = newline, normal mode = send -;; (evil-define-key 'insert agent-shell-mode-map (kbd "RET") #'newline) -;; (evil-define-key 'normal agent-shell-mode-map (kbd "RET") #'comint-send-input) -;; -;; ;; Configure *agent-shell-diff* buffers to start in Emacs state -;; (add-hook 'diff-mode-hook -;; (lambda () -;; (when (string-match-p "\\*agent-shell-diff\\*" (buffer-name)) -;; (evil-emacs-state))))) -