-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.tmux.conf
146 lines (106 loc) · 3.82 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
135
136
137
138
139
140
141
142
143
144
145
146
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind \\ split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %
# Mouse Scrolling Enabled
set -g mouse off
# Window Configuration
bind q kill-window
unbind &
# Window Navigation
bind n next-window
bind p previous-window
##Open cd
#bind o split-window -h -c '#{pane_current_path}'\; send-keys 'atom .' Enter
# Session Configuration
#bind -n C-s choose-session
# Pane Configuration
bind x kill-pane
#bind q setw synchronize-panes
# Pane Navigation
is_vim="echo '#{pane_current_command}' | grep -iqE '(^|\/)vim$'"
is_fzf="ps | grep -iqE fzf$"
bind -n C-h run "($is_vim && tmux send-keys C-h) || \
tmux select-pane -L"
bind -n C-j run "($is_vim && tmux send-keys C-j) || \
($is_fzf && tmux send-keys C-j) || \
tmux select-pane -D"
bind -n C-k run "($is_vim && tmux send-keys C-k) || \
($is_fzf && tmux send-keys C-k) || \
tmux select-pane -U"
bind -n C-l run "($is_vim && tmux send-keys C-l) || \
tmux select-pane -R"
# Pane Resize
bind h resize-pane -L 8
bind j resize-pane -D 4
bind k resize-pane -U 4
bind l resize-pane -R 8
# Comprc Window
bind e new-window \; rename-window 'Comprc' \; send-keys comprc Enter
# Refresh TMUX
bind r source-file ~/.tmux.conf
# Other examples:
# Plugins
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# VIM
set-window-option -g mode-keys vi
if-shell '[ $(bc <<< $(tmux -V | cut -d" " -f2)" > 2.3") -gt 0 ]' \
"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" \
"bind-key -Tcopy-mode-vi 'v' send -X begin-selection; bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel \"xclip -i -sel c\""
set-option -g allow-rename off
set -g focus-events on
# Start panes at 1
set -g base-index 1
set -g pane-base-index 1
###############################
########### Theme #############
###############################
# Base of Powerline Blue Block
# Status update interval
#set -g status-interval 1
# Basic status bar colors
set -g status-fg colour240
set -g status-bg colour233
# Left side of status bar
set -g status-left-style fg=colour243,bg=colour234
set -g status-left-length 40
set -g status-left "#[fg=colour232]#[bg=colour255]#[bold] #S #[fg=colour255]#[bg=colour233]"
# Right side of status bar
set -g status-right-style fg=colour233,bg=colour233
set -g status-right-length 150
set -g status-right "#[fg=colour255]#[bg=colour233]#[fg=colour232,bg=colour255,bold] #H "
# Window status
set -g window-status-format " #I #W "
set -g window-status-current-format "#[fg=colour233,bg=colour31]#[fg=colour258,bg=colour31] #I #W #[fg=colour31,bg=colour233,nobold]"
# Current window status
set -g window-status-current-style fg=colour232,bg=colour24
# Window with activity status
set -g window-status-activity-style bg=colour31,fg=colour233 # fg and bg are flipped here due to a bug in tmux
# Window separator
set -g window-status-separator ""
# Window status alignment
#set -g status-justify centre
# Pane border
set -g pane-border-style fg=colour238,bg=default
# Active pane border
set -g pane-active-border-style fg=colour24,bg=default
# Pane number indicator
set -g display-panes-colour colour233
set -g display-panes-active-colour colour245
# Clock mode
#set -g clock-mode-colour colour24
#set -g clock-mode-style 24
# Message
set -g message-style fg=black,bg=colour24
# Command message
set -g message-command-style fg=black,bg=colour233
# Mode
set -g mode-style fg=colour231,bg=colour24
run '~/.tmux/plugins/tpm/tpm'