feat(emacs/term): replace VTerm with Eat

This commit is contained in:
Lucien Cartier-Tilet 2025-05-24 21:22:26 +02:00
parent 4a31230d16
commit 295ed85fd5
Signed by: phundrak
SSH Key Fingerprint: SHA256:CE0HPsbW3L2YiJETx1zYZ2muMptaAqTN2g3498KrMkc
2 changed files with 18 additions and 44 deletions

View File

@ -120,8 +120,7 @@ I also have two main shell-related functions, prefixed with ~as~.
|-----+-------------+-------------+-------------| |-----+-------------+-------------+-------------|
| | | shells | | | | | shells | |
| e | eshell-new | | | | e | eshell-new | | |
| v | vterm | | vterm | | t | eat | | eat |
| V | multi-vterm | | multi-vterm |
*** Treemacs *** Treemacs
#+name: keybindings-treemacs #+name: keybindings-treemacs

View File

@ -1557,6 +1557,22 @@ look nice.
#+end_src #+end_src
** Shells ** Shells
*** Eat
Eat is a modern shell emulator for Emacs. I use it as a replacement
for VTerm as I never got VTerm to actually work on NixOS.
#+begin_src emacs-lisp
(use-package eat
:defer t
:straight (eat :type git
:host codeberg
:repo "akib/emacs-eat"
:files ("*.el" ("term" "term/*.el") "*.texi"
"*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el"))))
#+end_src
*** Shell-pop *** Shell-pop
Shell-pop allows the user to easily call for a new shell in a pop-up Shell-pop allows the user to easily call for a new shell in a pop-up
buffer. buffer.
@ -1566,7 +1582,7 @@ buffer.
:straight (:build t) :straight (:build t)
:custom :custom
(shell-pop-default-directory "/home/phundrak") (shell-pop-default-directory "/home/phundrak")
(shell-pop-shell-type (quote ("eshell" "*eshell*" (lambda () (eshell shell-pop-term-shell))))) (shell-pop-shell-type (quote ("eat" "*eat-pop*" (lambda () (eat)))))
(shell-pop-window-size 30) (shell-pop-window-size 30)
(shell-pop-full-span nil) (shell-pop-full-span nil)
(shell-pop-window-position "bottom") (shell-pop-window-position "bottom")
@ -1575,47 +1591,6 @@ buffer.
(shell-pop-cleanup-buffer-at-process-exit t)) (shell-pop-cleanup-buffer-at-process-exit t))
#+end_src #+end_src
*** VTerm
VTerm gives Emacs access to regular shells with an almost regular
emulator. Be aware you will most likely need to hit ~C-c~ twice to send
an interrupt signal.
#+begin_src emacs-lisp
(use-package vterm
:defer t
:straight (:build t)
:config
(setq vterm-shell "/usr/bin/fish"
vterm-always-compile-module t))
#+end_src
One annoying think with vterm is it only can create one buffer, you
cant have multiple vterm buffers by default. ~multi-vterm~ fixes this
issue.
#+begin_src emacs-lisp
(use-package multi-vterm
:after vterm
:defer t
:straight (:build t)
:general
(phundrak/major-leader-key
:packages '(vterm multi-vterm)
:keymap 'vterm-mode-map
"c" #'multi-vterm
"n" #'multi-vterm-next
"p" #'multi-vterm-prev))
#+end_src
Another really neat package is =eshell-vterm= which allows to use vterm
to run visual commands when in Eshell.
#+begin_src emacs-lisp
(use-package eshell-vterm
:after eshell
:straight (:build t)
:config
(eshell-vterm-mode)
(defalias 'eshell/v 'eshell-exec-visual))
#+end_src
** XWidgets Webkit Browser ** XWidgets Webkit Browser
I used to use the xwidgets webkit browser in order to view or preview I used to use the xwidgets webkit browser in order to view or preview
HTML files from Emacs, but it seems the Cairo background transparency HTML files from Emacs, but it seems the Cairo background transparency