This repository has been archived by the owner on Nov 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf.local
126 lines (101 loc) · 4.62 KB
/
tmux.conf.local
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
set -g default-terminal "screen-256color"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
#------------------------------------------------------------------------------
# SHORTCUT
#------------------------------------------------------------------------------
#On change Control +b par Control +x
set -g prefix C-x
unbind C-b
bind C-x send-prefix
# reload .tmux.conf file
bind r source ~/.tmux.conf
set -sg escape-time 0
#On utlise control + flèches pour naviguer entre les terminaux
bind-key -n C-right next
bind-key -n C-left prev
# #on utilise alt + flèches our naviguer entre les panels
bind-key -n M-left select-pane -L
bind-key -n M-right select-pane -R
bind-key -n M-up select-pane -U
bind-key -n M-down select-pane -D
# quit tmux
bind-key -n C-q kill-server
# Mouse on tmux
set -g mouse on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# C-c: save into system clipboard (+). With preselection.
bind C-c choose-buffer "run \"tmux save-buffer -b %% - | xclip -i -sel clipboard\" \; run \" tmux display \\\"Clipboard \(+\) filled with: $(tmux save-buffer -b %1 - | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \\\" \" "
# C-v: copy from + clipboard.
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" \; run "tmux display \"Copied from \(+\) $(xclip -o -sel clipboard | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \""
# C-d: save into selection clipboard (*). With preselection.
bind C-d choose-buffer "run \"tmux save-buffer -b %% - | xclip -i\" \; run \" tmux display \\\"Clipboard \(*\) filled with: $(tmux save-buffer -b %1 - | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \\\" \" "
# C-f: copy from * clipboard.
bind C-f run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer" \; run "tmux display \"Copied from \(*\) $(xclip -o | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \""
sset -sg escape-time 0
#On change les raccourcis pour faire du split vertical et horizontal
#On utilise la touche "|" (pipe) pour faire un split vertical
bind | split-window -h
#Et la touche "-" pour faire un split horizontal
bind - split-window -v
#------------------------------------------------------------------------------
# PANE
#------------------------------------------------------------------------------
# not active pane separator
set -g pane-border-fg colour244
set -g pane-border-bg default
# active pane separator
set -g pane-active-border-fg colour124
set -g pane-active-border-bg default
#------------------------------------------------------------------------------
# STATUSBAR
#------------------------------------------------------------------------------
# default statusbar colors
set -g status-fg colour235
set -g status-bg colour250
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set -g status-attr dim
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
# current or active window in status bar
set-window-option -g window-status-current-fg colour15
set-window-option -g window-status-current-bg colour0
set-window-option -g window-status-current-format ' #W '
# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# command/message line colors
set -g message-fg colour15
set -g message-bg colour124
set -g message-attr dim
# left side of status bar
set -g status-left-length 30
set -g status-left ' #S | #(hostname | cut -d. -f 1) '
# right side of status bar
set -g status-right-length 30
set -g status-right '%Y-%m-%d | %H:%M '
# status bar options
set-option -g status-justify centre # alignment of windows
set-window-option -g window-status-format ' #W ' # Inactive windows in status bar
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
#set-window-option -g clock-mode-colour colour64 #green
set-window-option -g clock-mode-colour colour33 #green