forked from hoodietramp/tmux_config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
141 lines (102 loc) · 4.24 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
#Change Bind Key
set -g prefix C-a
bind C-a send-prefix
unbind C-b
#Set History
set -g history-limit 500000
#Prevent automatic renaming of tabs
set -g allow-rename off
#Use Vim keybindings
set-window-option -g mode-keys vi
#Status Bar Stuff
set -g status-interval 3
set-option -g status-position top
set-option -g status-justify "centre"
# Switch betewen panes using alt + arrow
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
# Use r to quickly reload tmux settings
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config'
# Length of tmux status line
set -g status-left-length 30
set -g status-right-length 150
set-option -g status "on"
# Default statusbar color
set-option -g status-style bg=colour39,fg=colour223
# Default window title colors
set-window-option -g window-status-style bg=cyan,fg=colour237
# Default window with an activity alert
set-window-option -g window-status-activity-style bg=cyan,fg=cyan
# Active window title colors
set-window-option -g window-status-current-style bg=green,fg=colour237
# Set active pane border color
set-option -g pane-active-border-style fg=colour39
#set-option -g pane-active-border-style fg=colour214
# Set inactive pane border color
set-option -g pane-border-style fg=colour239
# Message info
set-option -g message-style bg=colour239,fg=colour223 # bg=bg2, fg=fg1
# Writing commands inactive
set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1
set-option -g status-left "\
#[fg=colour7, bg=colour241]#{?client_prefix,#[bg=colour167],} #S \
#[fg=colour241, bg=colour237]#{?client_prefix,#[fg=colour167],} #{?window_zoomed_flag,🔍 ,}"
set-option -g status-right "\
#[fg=colour214, bg=colour237] \
#[fg=colour237, bg=colour214] #(~/VPN.sh)\
#[fg=colour246, bg=colour237] %b %d '%y\
#[fg=colour109] %l:%M %p \
#[fg=colour248, bg=colour239]"
set-window-option -g window-status-current-format "\
#[fg=colour237, bg=colour214]\
#[fg=colour239, bg=colour214] #I*\
#[fg=colour239, bg=colour214, bold] #W \
#[fg=colour214, bg=colour237]"
set-window-option -g window-status-format "\
#[fg=colour237,bg=colour239,noitalics]\
#[fg=colour223,bg=colour239] #I\
#[fg=colour223, bg=colour239] #W"
#Colours
set -g default-terminal "xterm-256color"
#Change Split Commands -- keeping current working directory
bind c new-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
#Uncomment to remove old bindings:
unbind '"'
unbind %
#Send any copied information into the main clipboard using xclip
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
## TESTING
# Linux only
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
# To copy, left click and drag to highlight text in yellow,
# once you release left click yellow text will disappear and will automatically be available in clibboard
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
# List of plugins ATTEMPT, NO USE AT THE MOMENT
#set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'
#set -g @plugin 'tmux-plugins/tmux-resurrect'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
#run '~/.tmux/plugins/tpm/tpm'