This repository has been archived by the owner on Jan 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
72 lines (60 loc) · 2.25 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# To not fuck everything up when I’m using Vim, use a pretty short Escape time for Alt shortcuts.
set -g escape-time 20
# Start numbering windows with the leftmost key on the keyboard and allow renumbering.
set -g base-index 1
set -g renumber-windows on
# 64k (lines, that is) of history ought to be enough for everyone.
set -g history-limit 64000
# Enable mouse.
set -g mouse on
# When multiple clients are connected to the same session, determine the size of windows depending on where they are
# _displayed_, not where they are attached to. This allows for different screen sizes inside of the same session
# group, as long as not the clients are looking at different windows each.
set -g aggressive-resize on
# On Termux, we have a 256-color terminal.
if-shell "[ -d /data/data/com.termux]" "set -g default-terminal screen-256color"
# ^Z is just way easier to type than ^B.
# ^A isn’t really an alternative for me since I use it often to go to the beginning of the line.
set -g prefix C-Z
# By default, ^Z ^Z suspends the client. I don’t need that, but I need to be able to send ^Z to the shell.
bind C-Z send-prefix
# New shells.
bind -n M-s split-window -v
bind -n M-S split-window -h
bind -n M-c new-window
# Moving around between windows.
bind -n M-, select-window -p
bind -n M-. select-window -n
bind -n M-0 select-window -t :0
bind -n M-1 select-window -t :1
bind -n M-2 select-window -t :2
bind -n M-3 select-window -t :3
bind -n M-4 select-window -t :4
bind -n M-5 select-window -t :5
bind -n M-6 select-window -t :6
bind -n M-7 select-window -t :7
bind -n M-8 select-window -t :8
bind -n M-9 select-window -t :9
# Moving around between panes.
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Moving panes around.
bind -n M-H swap-pane -d -t {left-of}
bind -n M-J swap-pane -d -t {down-of}
bind -n M-K swap-pane -d -t {up-of}
bind -n M-L swap-pane -d -t {right-of}
# Changing pane layout.
bind -n M-f resize-pane -Z
bind C-e select-layout even-vertical
bind C-w select-layout even-horizontal
bind -r C-h resize-pane -L
bind -r C-j resize-pane -D
bind -r C-k resize-pane -U
bind -r C-l resize-pane -R
# Assorted key bindings.
bind -n M-/ copy-mode
bind = setw synchronize-panes
bind C-d detach
bind C-M-d kill-session