forked from kristijanhusak/neovim-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
54 lines (48 loc) · 2.62 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
set -g default-terminal "screen-256color"
set -g base-index 1
set -g pane-base-index 1
# Remove escape timeout
set -s escape-time 0
# Enable mouse mode
set -g mouse on
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
bind-key -t vi-copy WheelUpPane halfpage-up
bind-key -t vi-copy WheelDownPane halfpage-down
# Shortcuts
bind-key -n C-n split-window -h -c '#{pane_current_path}'
bind-key -n C-o split-window -c '#{pane_current_path}'
bind-key -n C-w kill-pane
bind-key -n C-f resize-pane -Z
#Vi setup
setw -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-pipe 'xclip -selection clipboard >/dev/null'
# statusbar settings - adopted from tmuxline.vim and vim-airline - Theme: murmur
set -g status-justify "left"
set -g status "on"
set -g status-left-style "none"
set -g message-command-style "fg=colour144,bg=colour237"
set -g status-right-style "none"
set -g pane-active-border-style "fg=colour27"
set -g status-style "bg=colour234,none"
set -g message-style "fg=colour144,bg=colour237"
set -g pane-border-style "fg=colour237"
set -g status-right-length "100"
set -g status-left-length "100"
setw -g window-status-activity-attr "none"
setw -g window-status-activity-style "fg=colour27,bg=colour234,none"
setw -g window-status-separator ""
setw -g window-status-style "fg=colour39,bg=colour234,none"
set -g status-left "#[fg=colour15,bg=colour27] #{pane_current_path} #[fg=colour27,bg=colour234,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=colour237,bg=colour234,nobold,nounderscore,noitalics]#[fg=colour144,bg=colour237] %d.%m.%Y %H:%M #[fg=colour27,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour15,bg=colour27] #h "
setw -g window-status-format "#[fg=colour39,bg=colour234] #W "
setw -g window-status-current-format "#[fg=colour234,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour144,bg=colour237] #W #P/#{window_panes} #[fg=colour237,bg=colour234,nobold,nounderscore,noitalics]"
# 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"