diff options
Diffstat (limited to '.config/emacs/modules/bd--shells.el')
-rw-r--r-- | .config/emacs/modules/bd--shells.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/.config/emacs/modules/bd--shells.el b/.config/emacs/modules/bd--shells.el index 1ca8bb0..4396ae1 100644 --- a/.config/emacs/modules/bd--shells.el +++ b/.config/emacs/modules/bd--shells.el @@ -33,19 +33,20 @@ status, and path." ;;;; shell -(defun shell-open-buffer () - "Opens eshell in the bottom -side window." - (interactive) - (let ((curr-buffer (current-buffer)) - (shell (shell))) - (switch-to-buffer curr-buffer) - (display-buffer-in-side-window (get-buffer shell) '((side . top))) - (switch-to-buffer-other-window shell))) - - (require 'shell) -(keymap-global-set "C-z C-e" 'shell-open-buffer) +(add-to-list 'display-buffer-alist + `("\\*shell\\*" + (display-buffer-in-side-window) + (side . top) + (window-height . 20))) + +(keymap-global-set "C-z C-e" (lambda () + (interactive) + (let ((curr-buffer (current-buffer)) + (shell (shell))) + (switch-to-buffer curr-buffer) + (display-buffer (get-buffer shell)) + (switch-to-buffer-other-window shell)))) (keymap-set eshell-mode-map "C-q" 'delete-window) ; mostly for side window (keymap-set shell-mode-map "C-c C-k" #'comint-clear-buffer) (setopt shell-command-prompt-show-cwd t |