-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
51 lines (41 loc) · 1.93 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
# act like GNU screen - also, A is closer than B.
unbind C-b
set -g prefix C-a
# reload tmux.conf with prefix-r
bind C-r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
set-option -ga terminal-overrides ",xterm-256color:Tc" # add truecolor support
set -g default-terminal "screen-256color" # default terminal is 256 colors
set -g base-index 1 # set base index to 1
set -g renumber-windows on # renumber windows sequentially after closing any
set -g history-limit 50000 # increase tmux history
# status bar things
set -g status-bg '#666666'
set -g status-fg '#aaaaaa'
set -g status-right-length 100
set -g status-right '#(tmux-spotify-info) :: %d %b %Y :: %l:%M %p '
setw -g window-status-current-format "#[fg=yellow,bold]#I:#W#F"
# enable mouse
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send -X halfpage-down
# move around panes like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# split panes depending on - or | orientation
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# visually select and copy like in Vim
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy"
# TODO: Figure out what this stuff does
unbind -T copy-mode-vi Space
bind -T copy-mode-vi Space send -X jump-again
# TODO: Figure out what this stuff does
bind y run 'tmux save-buffer - | pbcopy '
bind C-y run 'tmux save-buffer - | pbcopy '