-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.tmux.conf
executable file
·130 lines (94 loc) · 3.37 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
# Use vi keybindings for tmux commandline input.
# Note that to get command mode you need to hit ESC twice...
set -g status-keys vi
# Use vi keybindings in copy and choice modes
setw -g mode-keys vi
set -g history-limit 40000
# focus events enabled for terminals that support them
set-option -g focus-events on
# Show messages longer.
set-option -g display-time 4000
#############################################
## BINDINGS
# C-b is not acceptable -- Vim uses it
unbind C-b
set-option -g prefix C-a
bind a send-keys C-a
# I like to nest tmux sometimes
bind-key a send-prefix
# reload tmux config
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config.'
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
# hjkl pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Moving panes around
bind-key b command-prompt -p "bring pane from:" "join-pane -h -s '%%'"
bind-key s command-prompt -p "send pane to:" "join-pane -h -t '%%'"
# Moving windows around
bind [ swap-window -d -t -1
bind ] swap-window -d -t +1
bind-key T setw synchronize-panes
#############################################
set -g mouse on
bind -n WheelUpPane if-shell -Ft= '#{mouse_any_flag}' 'send-keys -M' 'if -Ft= "#{pane_in_mode}" "send-keys -M" "copy-mode -e"'
# Idk why this is here
set -g default-terminal "xterm-256color"
set -g default-command "${SHELL}"
set -g status-position bottom
set -g status-interval 5
set -g status-justify centre # center align window list
set -g status-left-length 20
set -g status-right-length 140
set -g status-left '#[fg=green]#H #[fg=black]• #[fg=green,bright]#{client_session}#[default]'
set -g status-right '#[fg=blue]%Y-%m-%d #[fg=white,bg=default]%a%l:%M:%S %p#[default]'
# Start numbering at 1
set -g base-index 1
# Allows for faster key repetition
set -sg escape-time 0
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Auto renumber windows
set-option -g renumber-windows on
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# Vi copypaste mode
set-window-option -g mode-keys vi
# auto window rename
set-window-option -g automatic-rename
#### COLOUR (Solarized dark)
# default statusbar colors
set-option -g status-style "fg=yellow,bg=colour0"
# default window title colors
set-window-option -g window-status-style "bg=black,fg=brightblue"
# active window title colors
# Highlight active window
set-window-option -g window-status-current-style "bg=default,fg=brightred,bright"
# pane border
set-option -g pane-border-style "fg=black"
set-option -g pane-active-border-style "fg=brightgreen"
# message text
set-option -g message-style "bg=black,fg=brightred"
# pane number display
set-option -g display-panes-active-colour blue
set-option -g display-panes-colour brightred #orange
# clock
set-window-option -g clock-mode-colour green
# Use the bell for alerts
set-option -g bell-action any
#set-option -g bell-on-alert on
# Special configuration scripts
bind A source-file ~/.tmux/arch
# fix ssh agent when tmux is detached
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
# Make sure we're always using bash.
set-option -g default-command "exec /bin/bash"