-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.linux
114 lines (84 loc) · 3.03 KB
/
tmux.linux
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
unbind C-b
set -g prefix C-f
bind C-f send-prefix
# toggle last window by hitting again C-f
bind-key C-f last-window
#setw -g mode-keys vi
#setw -g xterm-keys on
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
setw -g aggressive-resize off
# Start windows and pane numbering with index 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# re-number windows when one is closed
set -g renumber-windows on
setw -g monitor-activity on
# copy mode
bind-key -T copy-mode-vi y send-keys -X copy-selection
unbind -T copy-mode-vi MouseDragEnd1Pane
# Show times longer than supposed
set -g display-panes-time 2000
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# {n}vim compability
set-option -g default-terminal "screen-256color"
set-option -g terminal-overrides "screen-256color"
set-option -sa terminal-features ',xterm-256color:RGB'
bind -n C-l send-keys -R C-l \; clear-history
# set default command
set -g default-command "${SHELL} -l"
# Split horiziontal and vertical splits, instead of % and "
# Also open them in the same directory
bind-key C-v split-window -h -c '#{pane_current_path}'
bind-key C-s split-window -v -c '#{pane_current_path}'
# Source file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Scroll with mouse
set -g mouse on
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
# copy to clipboard
set -g set-clipboard on
bind-key -T copy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy"
######################
### DESIGN CHANGES ###
######################
# loud or quiet?
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action none
setw -g mode-keys vi
# selection color
# setw -g mode-style "bg=colour19,fg=white,bold"
set-option -g history-limit 5000
# move panel binding
bind C-h select-pane -L
bind C-j select-pane -D
bind C-k select-pane -U
bind C-l select-pane -R
# Remove SSH_AUTH_SOCK to disable tmux automatically resetting the variable
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID \
SSH_CONNECTION WINDOWID XAUTHORITY"
# Use a symlink to look up SSH authentication
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
#set inactive/active window styles
#set -g window-style 'fg=colour247,bg=colour236'
#set -g window-active-style 'fg=colour250,bg=black'
# status panel
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour15
set -g status-left '#[fg=colour11,bold] [#(whoami)@#{host}] '
set -g status-right '#[fg=colour15,bg=colour8,bold] %d/%m #[fg=colour233,bg=colour7,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 30
setw -g mode-keys vi
setw -g window-status-current-format ' #[bg=colour7,fg=colour233,bold] #I:#W#[fg=colour1]#F '
setw -g window-status-format ' #I:#W#[fg=colour15]#F '