forked from metiu07/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
127 lines (99 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
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
# Change the prefix from 'C-b' to 'C-a'
# (remap capslock to CTRL for easy access)
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
##############
## SETTINGS ##
##############
# Set default terminal mode to 256 colors
set -g default-terminal "tmux-256color"
# Default key repeat is 500ms, lower to 125ms
# otherwise hitting up arrow right after moving to new window counts
# as moving back to window above
set -g repeat-time 125
# Set escape time for emacs inside tmux
set -s escape-time 0
# Start with window 1 (instead of 0)
set -g base-index 1
# Start with pane 1 (instead of 0)
set -g pane-base-index 1
# Don't rename windows automatically
set-option -g allow-rename off
# Mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# set -g mode-mouse off
# set -g mouse-resize-pane on
# set -g mouse-select-pane on
# set -g mouse-select-window on
# History
set -g history-limit 100000
# Enable vi mode keys
set-window-option -g mode-keys vi
# vim key in copy mode
setw -g mode-keys vi
# Fix pbcopy/pbpaste
if 'command -v reattach-to-user-namespace >/dev/null' \
'set -gq @osx-pasteboard true'
# if 'tmux show -gv @osx-clipboard' \
# 'set -g default-command "reattach-to-user-namespace -l $SHELL"'
##################
## KEY BINDINGS ##
##################
# Bind ` to switch to last window
bind-key ` last-window
# Bind r to reload tmux config file
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# Split panes using | and -, make sure they open in the same path
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# Bind c to open new window
bind c new-window -c '#{pane_current_path}'
# Bind C to open new session
bind C new-session -c '#{pane_current_path}'
# Present a menu of URLs to open from the visible pane. sweet.
bind-key u capture-pane \;\
save-buffer /tmp/tmux-buffer \;\
split-window -l 10 "urlview /tmp/tmux-buffer"
# vim style movement
bind Left select-pane -L
bind Down select-pane -D
bind Up select-pane -U
bind Left select-pane -R
# Resize window
bind < resize-pane -L 5
bind > resize-pane -R 5
###########
## STYLE ##
###########
# 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
# modes
setw -g clock-mode-colour colour5
setw -g mode-style 'fg=colour1 bg=colour18 bold'
# panes
set -g pane-border-style 'fg=colour19 bg=colour0'
set -g pane-active-border-style 'bg=colour0 fg=colour9'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour18 fg=colour137 dim'
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour19] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style 'fg=colour1 bg=colour19 bold'
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-style 'fg=colour9 bg=colour18'
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
# messages
set -g message-style 'fg=colour232 bg=colour16 bold'
# Start tmux plugin manager
run '~/.tmux/plugins/tpm/tpm'