diff options
Diffstat (limited to '.config/emacs/bd-shells.el')
-rw-r--r-- | .config/emacs/bd-shells.el | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/.config/emacs/bd-shells.el b/.config/emacs/bd-shells.el index e6789c5..9f0b919 100644 --- a/.config/emacs/bd-shells.el +++ b/.config/emacs/bd-shells.el @@ -1,6 +1,16 @@ ;; -*- lexical-binding: t; -*- +(defun eshell-open-buffer () + "Opens eshell in the bottom +side window." + (interactive) + (let ((curr-buffer (current-buffer)) + (eshell (eshell))) + (switch-to-buffer curr-buffer) + (display-buffer-in-side-window (get-buffer eshell) '((side . top))) + (switch-to-buffer-other-window eshell))) + (defun bd/get-prompt-path () (abbreviate-file-name (eshell/pwd))) @@ -17,18 +27,16 @@ status, and path." (propertize current-branch 'face `(:foreground "#98d1ce")))) (format " %s " (all-the-icons-fileicon "gn")) (propertize (bd/get-prompt-path) 'face `(:foreground "#33859d")) - (format " %s " (all-the-icons-material "watch_later")) - (propertize (format-time-string "%a, %R") 'face `(:foreground "#888ba5")) + (propertize (format-time-string " %a, %R") 'face `(:foreground "#888ba5")) (propertize "\n> " 'face `(:foreground "#c33027"))))) -(current-time-string) -(format-time-string "%a, %R") - (use-package eshell :init (require 'magit) - :bind (:map eshell-mode-map - ("<tab>" . completion-at-point)) + :bind (("C-z C-e" . 'eshell-open-buffer) + :map eshell-mode-map + ("C-q" . 'delete-window) ; mostly for side window + ("<tab>" . completion-at-point)) :custom (eshell-prompt-function 'bd/eshell-prompt) (eshell-prompt-regexp "^> ") |