.tmux.conf 2.67 KB
Newer Older
1
2
3
4
5
# Change prefix
set -g prefix C-a
bind C-a send-prefix
unbind C-b

6
# Force bash as default shell
gagbo's avatar
gagbo committed
7
8
9
10
11
set -g default-shell /usr/bin/fish
# set -g default-command fish

set -g history-limit 10000
set -g allow-rename off
12

13
14
15
# Enable vi keys
setw -g mode-keys vi

gagbo's avatar
gagbo committed
16
17
18
# Xterm-keys is necessary for emacs in tmux
set-window-option -g xterm-keys on

19
20
# Copy/Paste tricks
bind Escape copy-mode
gagbo's avatar
gagbo committed
21
22
# bind -T vi-copy v begin-selection
# bind -T vi-copy y copy-selection
gagbo's avatar
gagbo committed
23
24
25
26
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind -T vi-copy y copy-pipe "xclip -sel clip -i"
gagbo's avatar
gagbo committed
27
28
unbind C-y
bind C-y paste-buffer
29
30
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"

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
# Setting delay between prefix and command
set -s escape-time 1

# Change the base index of the windows and the panes
set  -g base-index      1
setw -g pane-base-index 1

# Set a prefix shortcut for reloading your tmux config
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded !"

# Remap pane navigation to vim
unbind h
bind h select-pane -L
unbind j
bind j select-pane -D
unbind k
bind k select-pane -U
unbind l
bind l select-pane -R

# Pane resizing
unbind H
bind -r H resize-pane -L 5
unbind J
bind -r J resize-pane -D 5
unbind K
bind -r K resize-pane -U 5
unbind L
bind -r L resize-pane -R 5

# Use h and l for window selection
unbind C-h
bind -r C-h select-window -t:-
unbind C-l
bind -r C-l select-window -t:+

68
69
70
bind -n S-Left  previous-window
bind -n S-Right next-window

71
72
73
# Splitting panes with | and -
bind | split-window -h
bind - split-window -v
gagbo's avatar
gagbo committed
74
75
76

# Rename your terminals
set -g set-titles on
gagbo's avatar
gagbo committed
77
set -g set-titles-string '#(whoami) :: #h'
gagbo's avatar
gagbo committed
78

79
80
81
# Enable mouse interaction
set -g mouse on

82
# Set default terminal
83
set -g default-terminal "screen-256color"
gagbo's avatar
gagbo committed
84
# Color tweaks
85
86
87
set -ga terminal-overrides ",screen-256color:Tc"
set -ga terminal-overrides ",xterm-256color:Tc"
set -ga terminal-overrides ",alacritty:RGB"
88
89
90
91
92

# Style customizations
set -g status-style fg=white,bg=black
set -g message-style fg=white,bold,bg=black
setw -g window-status-style fg=cyan,bg=black
gagbo's avatar
gagbo committed
93
94
95
setw -g window-status-current-style fg=black,bg=cyan
setw -g pane-border-style fg=white,bg=black
setw -g pane-active-border-style fg=blue,bg=black
gagbo's avatar
gagbo committed
96
97

# Status bar customization
98
set -g status-interval 60
gagbo's avatar
gagbo committed
99
100
set -g status-left-length 90
set -g status-right-length 60
101
set -g status-left "#[fg=Green]#(whoami)#[fg=white] :: #[default]#(hostname -s)#[fg=cyan] (S: #S)"
102
set -g status-justify centre
103
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%a %d %b %R#[default]'
gagbo's avatar
gagbo committed
104

105
106
107
# Enable activity alerts
setw -g monitor-activity on
set -g visual-activity on