-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
116 lines (85 loc) · 3.23 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
#change prefix
set -g prefix C-s
unbind-key C-b
bind-key C-s send-prefix
#escape time
set -s escape-time 0
#reload configuration
#bind-key r source-file ~/.tmux.conf \;
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
bind-key -r j resize-pane -D 5
bind-key -r k resize-pane -U 5
bind-key -r h resize-pane -L 5
bind-key -r l resize-pane -R 5
#spliting windows
bind | split-window -h
bind - split-window -v
# vim
setw -g mode-keys vi
bind [ copy-mode
#bind -t vi-copy v begin-selection
#bind -t vi-copy y copy-selection
#bind -t vi-copy V rectangle-toggle
bind ] paste-buffer
# buffer
bind Space choose-buffer
#reattach fix opening things witht he command open from MAC
#set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"
#256 colors for vim
set -g default-terminal "screen-256color"
set-option -g default-shell /usr/bin/zsh
# Retach userspaces
#set -g default-command "reattach-to-user-namespace -l zsh"
#set -g pane-border-fg red
#set-option -g pane-active-border-fg red
#set-option -g pane-active-border-bg red
#Setting constants
#POWERLINE_HOME="/home/lalanne/tmux-powerline"
# Ensure the powerline daemon is running
run-shell "powerline-daemon -q"
# Invoke the tmux powerline binding
source "/usr/share/powerline/bindings/tmux/powerline.conf"
DISABLE_AUTO_TITLE=true
#### COLOUR (Solarized dark)
# default statusbar colors
set-option -g status-bg black #base02
set-option -g status-fg yellow #yellow
# set-option -g status-attr default
# default window title colors
#set-window-option -g window-status-fg brightblue #base0
#set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
#set-window-option -g window-status-current-fg brightred #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 black #base02
# set-option -g pane-active-border-fg brightgreen #base01
# message text
# set-option -g message-bg black #base02
#set-option -g message-fg brightred #orange
# pane number display
set-option -g display-panes-active-colour blue #blue
set-option -g display-panes-colour brightred #orange
# clock
set-window-option -g clock-mode-colour green #green
# bell
set-window-option -g window-status-bell-style fg=black,bg=red #base02, red
# Smart pane switching with awareness of vim splits
# # See: https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
# bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
#PLUGINS
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
#neovim neosolarized tmux
set-option -ga terminal-overrides ",xterm-256color:Tc"
# initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'