Emacs config with the hermes shortcut

This commit is contained in:
2026-05-14 17:11:08 -04:00
parent 386d1a3bf8
commit 311a2eae57

View File

@@ -18,7 +18,9 @@
(map! :leader (map! :leader
(:prefix ("w" . "window") (:prefix ("w" . "window")
:desc "Minimize window" "O" #'minimize-window)) :desc "Minimize window" "O" #'minimize-window)
(:prefix ("z" . "Personal")
:desc "Hermes Agent" "h" #'gortium/hermes-vterm))
(use-package! ultra-scroll (use-package! ultra-scroll
:init :init
@@ -1053,6 +1055,20 @@ DIFF:
:desc "GPT generate commit" :desc "GPT generate commit"
"g" #'gortium/magit-gptel-generate-commit) "g" #'gortium/magit-gptel-generate-commit)
(after! vterm
(defun gortium/hermes-vterm ()
"Launch Hermes Agent in vterm via SSH to lazyworkhorse (CLI mode)."
(interactive)
(let ((buf (get-buffer-create "*hermes*")))
(switch-to-buffer buf)
(unless (and (eq major-mode 'vterm-mode)
(get-buffer-process buf))
(vterm-mode)
(let ((proc (get-buffer-process buf)))
(when proc
(process-send-string
proc "ssh -t lazyworkhorse 'docker exec -it hermes /opt/hermes/.venv/bin/hermes'\n")))))))
;; set `tramp-direct-async-process' locally in all ssh connections ;; set `tramp-direct-async-process' locally in all ssh connections
(connection-local-set-profile-variables (connection-local-set-profile-variables
'remote-direct-async-process 'remote-direct-async-process