Fix per-workspace eshell buffers
This commit is contained in:
parent
a1b4616236
commit
e2442e7d80
2 changed files with 18 additions and 0 deletions
|
@ -75,6 +75,19 @@
|
||||||
(eshell-send-input nil t))))
|
(eshell-send-input nil t))))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Persp-mode integration
|
||||||
|
;;
|
||||||
|
|
||||||
|
(defun +eshell|switch-workspace ()
|
||||||
|
(setq +eshell-buffers
|
||||||
|
(or (persp-parameter 'eshell-buffers)
|
||||||
|
(make-ring 25))))
|
||||||
|
|
||||||
|
(defun +eshell|save-workspace ()
|
||||||
|
(set-persp-parameter 'eshell-buffers +eshell-buffers))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Commands
|
;; Commands
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -81,6 +81,11 @@ You should use `det-eshell-alias!' to change this.")
|
||||||
;; Enable autopairing in eshell
|
;; Enable autopairing in eshell
|
||||||
(add-hook 'eshell-mode-hook #'smartparens-mode)
|
(add-hook 'eshell-mode-hook #'smartparens-mode)
|
||||||
|
|
||||||
|
;; Persp-mode/workspaces integration
|
||||||
|
(when (featurep! :feature workspaces)
|
||||||
|
(add-hook 'persp-activated-functions #'+eshell|switch-workspace)
|
||||||
|
(add-hook 'persp-before-switch-functions #'+eshell|save-workspace))
|
||||||
|
|
||||||
;; UI enhancements
|
;; UI enhancements
|
||||||
(defun +eshell|remove-fringes ()
|
(defun +eshell|remove-fringes ()
|
||||||
(set-window-fringes nil 0 0)
|
(set-window-fringes nil 0 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue