-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
119 lines (95 loc) · 4.14 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
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# disable confirmations for kill pane and window
bind-key & kill-window
bind-key x kill-pane
set -g set-titles on
set -g status-position top
# force a reload of the config file
unbind r
bind r source-file ${HOME}/.tmux.conf
# Changing mode keys to vi
set-window-option -g mode-keys vi
# quick pane cycling
#unbind ^A
#bind ^A select-pane -t :.+
# Enable mouse for different versions of tmux
# (If 'awk' exits with status 0, 'if-shell' evaluates to true)
# https://stackoverflow.com/questions/35016458/how-to-write-if-statement-in-tmux-conf-to-set-different-options-for-different-t
# tmux < v2.1:
if-shell "tmux -V | awk '{exit !($2 < \"2.1\")}'" \
"setw -g mode-mouse on ; set -g mouse-select-pane on ; set -g mouse-resize-pane on ; set -g mouse-select-window on ;"
# tmux >= v2.1:
if-shell "tmux -V | awk '{exit !($2 >= \"2.1\")}'" \
"set -g mouse on ;"
# adding shortcut to enable/disable mouse mode
# Toggle mouse on with ^A m
bind m if-shell 'tmux show-options -g | grep mouse | grep on' \
'set -g mouse off ; display-message "mouse is off"' \
'set -g mouse on ; display-message "mouse is on"'
# Synchronize panes
bind s set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
# Allow tiling panes
unbind t
bind t select-layout tiled
# Pane switching with arrow keys (http://lukaszwrobel.pl/blog/tmux-tutorial-split-terminal-windows-easily)
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Highlight window with activity
setw -g monitor-activity on
set -g visual-activity off
# color support
#set -g default-terminal "xterm-256color"
# If the term variable is not screen, then home/end don't work in vim
# https://superuser.com/questions/532431/control-left-and-control-right-not-working-in-vim-within-a-screen-session
set -g default-terminal "screen-256color"
# make colors inside tmux look the same as outside of tmux
# see https://github.com/tmux/tmux/issues/696
# see https://stackoverflow.com/a/41786092
set-option -ga terminal-overrides ",xterm-256color:Tc"
# saner bindings for splitting screens (http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/)
# split panes using | and -
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %
# Scrollback limit
set -g history-limit 200000
# disable pane switching with ESC (https://stackoverflow.com/questions/43009211/how-to-disable-pane-switching-with-esc-in-tmux)
set -s escape-time 0
# theme from theme pack
#source-file "${HOME}/.tmux-themepack/powerline/block/gray.tmuxtheme"
#source-file "${HOME}/.tmux-themepack/powerline/gray.tmuxtheme"
# Enabling tmux-yank
#run-shell ${HOME}/.tmux-plugins/tmux-yank/yank.tmux
set -g focus-events on
# Enabling copy to clipper
# tmux < v2.1:
#if-shell "tmux -V | awk '{exit !($2 < \"2.4\")}' && uname -s | grep Linux" \
# "bind-key -t vi-copy Enter copy-pipe \"nc -UN ~/.clipper.sock\" ;"
#if-shell "tmux -V | awk '{exit !($2 < \"2.4\")}' && uname -s | grep Darwin" \
# "bind-key -t vi-copy Enter copy-pipe \"nc -U ~/.clipper.sock\" ;"
# tmux >= v2.1:
#if-shell "tmux -V | awk '{exit !($2 >= \"2.4\")}' && uname -s | grep Linux" \
# "bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel \"nc -UN ~/.clipper.sock\" ;"
#if-shell "tmux -V | awk '{exit !($2 >= \"2.4\")}' && uname -s | grep Darwin" \
# "bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel \"nc -U ~/.clipper.sock\" ;"
# Install tpm with:
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
#set -g @plugin 'dracula/tmux'
#set -g @dracula-show-powerline true
#set -g @dracula-show-timezone false
##set -g @dracula-plugins "cpu-usage ram-usage battery time"
#set -g @dracula-plugins "time"
set -g @plugin "arcticicestudio/nord-tmux"
#set -g @plugin 'egel/tmux-gruvbox'
#set -g @tmux-gruvbox 'light'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'