-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
100 lines (82 loc) · 3.27 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
# This is my current tmux file
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind-key -n C-b send-prefix
# Quicker escape key in tmux
set -g escape-time 0
#set-option -g default-shell "/bin/bash"
set-option -g default-shell $SHELL
# Setup for vi keys, but I don't use it currently
#set-window-option -g mode-keys vi
#bind-key -t vi-copy 'v' begin-selection
#bind-key -t vi-copy 'y' copy-pipe "nc localhost 8377"
set -g base-index 0
setw -g aggressive-resize on
set-option -ga terminal-overrides ',*:enacs@:smacs@:rmacs@:acsc@'
# Set up terminal
# This is what TERM will be inside the tmux session
set-option -g default-terminal "tmux-256color"
# This tells tmux to enable full colors if TERM outside is xterm-256color
set-option -g terminal-overrides ",xterm-256color:RGB"
# Set status bar
#set -g status-bg blue
#set -g status-fg white
#set -g status-left '#[fg=green]#H-#S '
set -g status-bg default
set -g status-fg default
set -g status-left '#H-#S '
set -g window-status-current-format "#[fg=default,background=default] #I:#W#F "
set -g window-status-format "#[fg=default,background=default] #I:#W#F"
setw -g window-status-style "none,fg=default,bg=default"
setw -g window-status-current-style reverse
# Set window title to basename of directory
set-option -g status-interval 5
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Highlight active pane
set -g pane-active-border-style "bg=cyan fg=default"
# When using the thyme pomodoro timer
set-option -g status-right "#(date +'%l:%M %a %D') :: #(cat ~/.thyme-tmux)"
set-option -g status-interval 1
# Configure terminal window title [How to keep terminal window title in sync with tmux window \- Super User](https://superuser.com/questions/1098077/how-to-keep-terminal-window-title-in-sync-with-tmux-window)
set-option -g set-titles on
set-option -g set-titles-string "#h #S-#W P:#{client_prefix}"
# Synchronize panes with e
bind e set -g synchronize-panes
bind-key j command-prompt -p "join pane:" "join-pane -t '%%'"
bind-key S command-prompt -p ssh: "new-window -n %1 'ssh %1'"
# Keep current directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
unbind c
bind c new-window -c "#{pane_current_path}"
# Use ALT+arrow keys to move between panes
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 ALT-fn keys to select pane
bind-key -n M-"`" select-window -t 0
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
bind-key -n M-0 select-window -t 10
bind-key -n M-- select-window -t 11
bind-key -n M-= select-window -t 12
bind-key -n M-q select-window -t 13
bind-key -n M-w select-window -t 14
bind-key -n M-e select-window -t 15
bind-key -n M-r select-window -t 16
bind-key -n M-t select-window -t 17
bind-key -n M-y select-window -t 18
bind-key -n M-u select-window -t 19
bind-key -n M-i select-window -t 20
# Include any local tmux configurations
if-shell "[ -f ~/.tmux.conf.local ]" "source-file ~/.tmux.conf.local"