Drop no-littering
[~bandali/configs] / lisp / bandali-multi-term.el
CommitLineData
1eb20313
AB
1;;; bandali-multi-term.el --- bandali's multi-term setup -*- lexical-binding: t; -*-
2
3;; Copyright (C) 2020 Amin Bandali
4
5;; Author: Amin Bandali <bandali@gnu.org>
6;; Keywords: terminals
7
8;; This program is free software; you can redistribute it and/or modify
9;; it under the terms of the GNU General Public License as published by
10;; the Free Software Foundation, either version 3 of the License, or
11;; (at your option) any later version.
12
13;; This program is distributed in the hope that it will be useful,
14;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;; GNU General Public License for more details.
17
18;; You should have received a copy of the GNU General Public License
19;; along with this program. If not, see <https://www.gnu.org/licenses/>.
20
21;;; Commentary:
22
23;; My multi-term configuration.
24
25;;; Code:
26
27(use-package multi-term
28 :disabled
29 :defer 0.6
30 :bind (("C-c a s m m" . multi-term)
31 ("C-c a s m d" . multi-term-dedicated-toggle)
32 ("C-c a s m p" . multi-term-prev)
33 ("C-c a s m n" . multi-term-next)
34 :map term-mode-map
35 ("C-c C-j" . term-char-mode))
36 :config
37 (setq multi-term-program "screen"
38 multi-term-program-switches (concat "-c"
39 (getenv "XDG_CONFIG_HOME")
40 "/screen/screenrc")
41 ;; TODO: add separate bindings for connecting to existing
42 ;; session vs. always creating a new one
43 multi-term-dedicated-select-after-open-p t
44 multi-term-dedicated-window-height 20
45 multi-term-dedicated-max-window-height 30
46 term-bind-key-alist
47 '(("C-c C-c" . term-interrupt-subjob)
48 ("C-c C-e" . term-send-esc)
49 ("C-c C-j" . term-line-mode)
50 ("C-k" . kill-line)
51 ;; ("C-y" . term-paste)
52 ("C-y" . term-send-raw)
53 ("M-f" . term-send-forward-word)
54 ("M-b" . term-send-backward-word)
55 ("M-p" . term-send-up)
56 ("M-n" . term-send-down)
57 ("M-j" . term-send-raw-meta)
58 ("M-y" . term-send-raw-meta)
59 ("M-/" . term-send-raw-meta)
60 ("M-0" . term-send-raw-meta)
61 ("M-1" . term-send-raw-meta)
62 ("M-2" . term-send-raw-meta)
63 ("M-3" . term-send-raw-meta)
64 ("M-4" . term-send-raw-meta)
65 ("M-5" . term-send-raw-meta)
66 ("M-6" . term-send-raw-meta)
67 ("M-7" . term-send-raw-meta)
68 ("M-8" . term-send-raw-meta)
69 ("M-9" . term-send-raw-meta)
70 ("<C-backspace>" . term-send-backward-kill-word)
71 ("<M-DEL>" . term-send-backward-kill-word)
72 ("M-d" . term-send-delete-word)
73 ("M-," . term-send-raw)
74 ("M-." . comint-dynamic-complete))
75 term-unbind-key-alist
76 '("C-z" "C-x" "C-c" "C-h"
77 ;; "C-y"
78 "<ESC>")))
79
80(provide 'bandali-multi-term)
81;;; bandali-multi-term.el ends here