-
Notifications
You must be signed in to change notification settings - Fork 4
/
.tmux.conf
81 lines (68 loc) · 2.59 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
73
74
75
76
77
78
79
80
81
# Seth Woodworth's tmux configuration (http://sethish.com)
set-option -g default-shell /bin/zsh
# Terminals report to running programs what kind of terminal
# they are. screen-256color makes this just work on linux.
#set -g default-terminal "screen-256color"
# Each shell in every tmux pane keeps a history of
# scrollback lines. I might as well keep a lot of it,
# what am I going to do, run out of ram?
set -g history-limit 1000000
# set window size to the smallest user's screen
# that is viewing the window
# Useful when you have connect to remote terminals
setw -g aggressive-resize on
# put the tmux bar on top
set-option -g status-position top
# when in copy-mode, or selection windows in tmux
# use the h j k l vimlike movement keys
setw -g mode-keys vi
set -s escape-time 0
# Keybindings
# use C-a rather than C-b
unbind C-b
set -g prefix C-a
# use C-a C-a as flip windows as in screen
bind-key C-a last-window
# gnu-screen's next (space)
unbind " "
bind " " next-window
# gnu screen's prev (bspace)
unbind BSpace
bind BSpace previous-window
# rename window
unbind A
bind A command-prompt "rename-window %%"
# reload tmux conf
bind r source-file ~/.tmux.conf
# make - and | split the window horizontally and vertically
unbind %
bind | split-window -h
bind - split-window -v
# make = and l do down and right minimum splits
bind = split-window -v -l 5
unbind l
bind l splitw -h -l 80
# create 80c vertical window on the left side
bind h split-window -h -l 80 -b
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi C-\ select-pane -l
set -s escape-time 0
run-shell "powerline-daemon -q"
source "${HOME}/.local/venvs/powerline-status/lib/python3.7/site-packages/powerline/bindings/tmux/powerline.conf"
# Enable truecolor?
# set-option -ga terminal-overrides ",xterm-256color:Tc"
set -g default-terminal 'screen-256color'
set -ga terminal-overrides ',screen-256color:Tc'
source-file ~/.config/tmux/tmuxline.conf