Skip to content

Commit

Permalink
Update:
Browse files Browse the repository at this point in the history
  devops/docker/Dockerfile
  emacs.org
  init.el
  • Loading branch information
nakkaya committed Aug 28, 2024
1 parent 3491158 commit 5a15934
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 26 deletions.
4 changes: 3 additions & 1 deletion devops/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ RUN apt-get update && \
# PDF Tools
libpng-dev zlib1g-dev libpoppler-glib-dev \
poppler-utils libpoppler-private-dev imagemagick \
# Vterm
cmake libvterm-dev \
# for cv2
libgl1 libglib2.0-0 \
# Jupyter
jupyter jupyter-notebook \
# emcas-jupyter
# emacs-jupyter
autoconf automake libtool \
-y --no-install-recommends && \
cleanup_apt_cache
Expand Down
83 changes: 59 additions & 24 deletions emacs.org
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,28 @@ SSH at least,
#+end_src

** Term
*** VTerm

#+BEGIN_SRC emacs-lisp
#+begin_src emacs-lisp :results silent
(when (package-installed-p 'vterm)
(require 'vterm)
(setq vterm-shell "/bin/bash")

(quelpa '(eshell-vterm
:fetcher github
:repo "iostapyshyn/eshell-vterm"
:files ("eshell-vterm.el")))

(use-package eshell-vterm
:demand t
:after eshell
:config
(eshell-vterm-mode)))
#+end_src

*** Term

#+BEGIN_SRC emacs-lisp :results silent
(setq term-term-name "eterm-color")

(require 'multi-term)
Expand All @@ -620,7 +640,9 @@ SSH at least,
"Open a new instance of eshell."
(interactive "P")
(if term-or-shell
(multi-term)
(if (package-installed-p 'vterm)
(vterm t)
(multi-term))
(eshell 'N)))
#+END_SRC

Expand All @@ -632,6 +654,8 @@ SSH at least,
(cons "\\*Async Shell Command\\*.*" (cons #'display-buffer-no-window nil)))
#+END_SRC

*** ChatGPT Shell

#+begin_src emacs-lisp :results silent
(require 'chatgpt-shell)

Expand Down Expand Up @@ -1902,28 +1926,32 @@ node `(org) External links' and Info node `(org) Search options'"
* Popper

#+begin_src emacs-lisp :results silent
(use-package popper
:ensure t ; or :straight t
:bind (("M-q" . popper-toggle-latest)
("M-\\" . popper-cycle)
("C-M-\\" . popper-toggle-type))
:init
(setq popper-reference-buffers
'("^\\*eshell.*\\*$" eshell-mode
"^*cider-repl.*"
"^*MATLAB.*"
"^\\*term.*\\*$" term-mode
"^*jupyter-.*"
inferior-python-mode
inferior-lisp-mode
compilation-mode))

(setq popper-display-function
(lambda (b a)
(display-buffer-same-window b a)))

(popper-mode +1)
(popper-echo-mode +1))
(use-package popper
:ensure t ; or :straight t
:bind (("M-q" . popper-toggle-latest)
("M-\\" . popper-cycle)
("C-M-\\" . popper-toggle-type))
:init
(setq popper-reference-buffers
'("^\\*eshell.*\\*$" eshell-mode
"^*cider-repl.*"
"^*MATLAB.*"
"^\\*term.*\\*$" term-mode
"^*jupyter-.*"
inferior-python-mode
inferior-lisp-mode
compilation-mode))

(when (package-installed-p 'vterm)
(push "^\\*vterm\\*.*" popper-reference-buffers)
(push 'vterm-mode popper-reference-buffers))

(setq popper-display-function
(lambda (b a)
(display-buffer-same-window b a)))

(popper-mode +1)
(popper-echo-mode +1))
#+end_src

* elfeed
Expand Down Expand Up @@ -2242,6 +2270,13 @@ if artifact_content:
(define-key term-raw-map (kbd "M-\\") #'popper-cycle)
(define-key term-raw-map (kbd "M-q") #'popper-toggle-latest))

(with-eval-after-load 'vterm
(define-key vterm-mode-map (kbd "C-]") #'helm-buffers-list)
(define-key vterm-mode-map (kbd "C-y") #'vterm-yank)
(define-key vterm-mode-map (kbd "C-\\") #'other-window)
(define-key vterm-mode-map (kbd "M-\\") #'popper-cycle)
(define-key vterm-mode-map (kbd "M-q") #'popper-toggle-latest))

(global-set-key "\M-[1;5C" #'forward-word)
(global-set-key "\M-[1;5D" #'backward-word)
(global-set-key "\M-[1;5A" #'backward-paragraph)
Expand Down
3 changes: 2 additions & 1 deletion init.el
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
(push 'org-pdftools package-list))

(when module-file-suffix
(push 'jupyter package-list))
(push 'jupyter package-list)
(push 'vterm package-list))

(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
Expand Down

0 comments on commit 5a15934

Please sign in to comment.