-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
134 lines (110 loc) · 3.08 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# ~/.tmux.conf
# https://github.com/NicolasCARPi/.dotfiles
# #################
# screen-like setup
# #################
# STATUS
set-option -g status-fg green
set-option -g status-bg black
# default interval is 15 seconds
set -g status-interval 5
# H host
# I current window index
# P current pane index
# S session name
# T current window title
# W current window name
# display hostname on left
set-option -g status-left "#H"
# display Mon 15/09 13:37 on right
set -g status-right "#[fg=white]#(~/.dotfiles/tmux-df.sh) #[fg=green]%a %d/%m #[fg=white,bright]%H:%M"
set-option -g mouse on
# center the stuff
set -g status-justify centre
set-option -g window-status-format "#I•#W#F"
# bright white on selected window
set-option -g window-status-current-format "#[fg=yellow][#[fg=white,bright]#I‣#W#F#[fg=yellow]]"
# C-v is escape sequence
unbind C-b
set -g prefix C-v
bind v send-prefix
# Ctrl-v to get to last window
unbind C-v
bind C-v last-window
# keep current dir on pane split
unbind %
#bind % split-window -c '#{pane_current_path}' -h -p 25
bind % split-window -c '#{pane_current_path}' -h -l 25%
unbind |
#bind | split-window -c '#{pane_current_path}' -v -p 30
bind | split-window -c '#{pane_current_path}' -v -l 25%
# copy pasta #
unbind [
# C to enter copy mode
bind C copy-mode
# v or space to select
bind-key -T copy-mode-vi 'v' send -X begin-selection
# y to yank, and it goes in primary and clipboard buffers
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "xclip -i -sel p -f | xclip -i -sel c"
# P to paste, or shift-inser as it's in both buffers
unbind P
#bind P paste-buffer
# paste with P
bind P run-shell 'tmux set-buffer -b x-clip "$(xsel -op)"' \; paste-buffer -b x-clip -d
# switch panes with Tab
unbind Tab
bind Tab select-pane -t :.+
#open man page with /
bind / command-prompt "split-window -h 'exec man %%'"
# resize pane with arrow keys or l and v
# -r: can be repeated without pressing prefix
# again (500ms after last '-r' action or prefix)
unbind v
unbind l
unbind Down
unbind Up
bind -r v resize-pane -L 5
bind -r l resize-pane -R 5
bind -r Down resize-pane -D 5
bind -r Up resize-pane -U 5
# new window c
unbind c
bind c new-window
# reload config without killing server
bind R source-file ~/.tmux.conf \; display-message " Config reloaded..."
# prev ^P p backspace
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window
# next ^N n space
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# kill window k
unbind k
bind k confirm-before "kill-window"
# redisplay ^L l
unbind ^L
bind ^L refresh-client
#unbind l
#bind l refresh-client
# clock
set-option -g clock-mode-colour white
# select urls
bind u run tmux-url-select.pl
# hyperlinks https://github.com/alacritty/alacritty/issues/922
#set -ga terminal-features "*:hyperlinks"
# List of plugins
#set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'wfxr/tmux-fzf-url'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
#run '~/.tmux/plugins/tpm/tpm'