-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
102 lines (80 loc) · 3.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
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
bind ^s split-window -v
bind ^v split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind ^h select-pane -L
bind ^j select-pane -D
bind ^k select-pane -U
bind ^l select-pane -R
# resize panes like vim
bind < resize-pane -L 5
bind > resize-pane -R 5
bind - resize-pane -D 5
bind + resize-pane -U 5
# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt
# session management
bind C new-session
bind L choose-session
# vi-style controls for copy mode
setw -g mode-keys vi
# Set the prefix to ^A, like screen
unbind C-b
set -g prefix ^A
bind a send-prefix
bind ^a last-window # toggle last window like screen
set -g update-environment "DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION SSH_AUTH_SOCK"
bind K confirm kill-server
bind X confirm kill-window
# let us use utf-8 drawing characters to make tab-like window formats
#set -g status-utf8 on
set -g status-style bg=default
set -g status-style fg=white
# left side of status bar holds "" (nothing! just empty)
set -g status-left-length 100
set -g status-left-style bg=green
set -g status-left-style fg=black
set -g status-left-style bold
set -g status-left ''
# right side of status bar holds "(date time)"
set -g status-right-length 100
set -g status-right-style fg=black,bold
set -g status-right '#[fg=blue](#[fg=white]%m-%d-%Y %l:%M#[fg=blue])#[default] '
# make background window look like white tab
set-window-option -g window-status-style bg=default
set-window-option -g window-status-style fg=white
set-window-option -g window-status-style none
set-window-option -g window-status-format ' \(#I) #W/ '
# make foreground window look like bold yellow foreground tab
set-window-option -g window-status-current-style bg=default
set-window-option -g window-status-current-style fg=yellow
set-window-option -g window-status-current-style bold
set-window-option -g window-status-current-format '\#[bg=default,underscore] (#I) #W #[default]/'
# active terminal yellow border, non-active white
set -g pane-border-style bg=default
set -g pane-border-style fg=white
set -g pane-active-border-style bg=default
set -g pane-active-border-style fg=yellow
# set a 256color $TERM variable so programs inside tmux know they can use 256 colors
set -g default-terminal screen-256color
# NOTE: the above line will break colors on OSX Terminal since it is only 8 colors.
# you can comment it out to use tmux with it.
# reload tmux config file with C-a r
bind r source ~/.tmux.conf \; display "Configuration Reloaded!"
set -g base-index 1
set -s escape-time 0
set-option -g status-keys emacs
bind-key 'P' run-shell "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer"
bind-key 'Y' run-shell "tmux show-buffer | pbcopy"
# Update binding on new window creation to open in the current working directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"