From 311a2eae576fb3646ff771d8e054e66853d0f49d Mon Sep 17 00:00:00 2001 From: Thierry Pouplier Date: Thu, 14 May 2026 17:11:08 -0400 Subject: [PATCH] Emacs config with the hermes shortcut --- doom/.config/doom/config.el | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/doom/.config/doom/config.el b/doom/.config/doom/config.el index ee75e4d..64b3639 100644 --- a/doom/.config/doom/config.el +++ b/doom/.config/doom/config.el @@ -18,7 +18,9 @@ (map! :leader (: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 :init @@ -1053,6 +1055,20 @@ DIFF: :desc "GPT 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 (connection-local-set-profile-variables 'remote-direct-async-process