I'm trying to write a function which opens or closes an eshell window. So far I have:
(defun bottom-window-eshell()
(interactive)
(let ((buf (eshell)))
(switch-to-buffer (other-buffer buf))
(switch-to-buffer-other-window buf)))
vterm-toggle
and I presume it's similar.