forked from tobinvanpelt/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.osx
93 lines (68 loc) · 2.49 KB
/
tmux.osx
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
# keybindings
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# window splits
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# only
#bind o kill-pane -a
# repeat timing
set -g repeat-time 200
# pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind < rotate-window -D
bind > rotate-window -U
bind / next-layout
# colors
set -g default-terminal "screen-256color"
set -g status-fg white
set -g status-bg colour235
set-window-option -g window-status-style fg=blue
set-window-option -g window-status-style bg=default
set-window-option -g window-status-style dim
set-window-option -g window-status-current-style fg=red
set-window-option -g window-status-current-style bg=default
set-window-option -g window-status-current-style bright
setw -g window-status-activity-style none
set -g pane-border-style fg=white,bg=default
set -g pane-active-border-style fg=yellow,bg=default
set -g message-style fg=white,bg=black,bright
# status lines
set -g status-left-length 60
set -g status-left "#h #[fg=green][#S] #[fg=yellow]#W:#T"
# 15% | 28 Nov 18:15
set -g status-right "#(battery) | #[fg=cyan]%d %b %R"
# other settings
set -sg escape-time 0
set -g base-index 1
setw -g pane-base-index 1
setw -g monitor-activity on
set -g visual-activity on
set -g status-justify centre
setw -g mode-keys vi
set -g status-interval 10
unbind Down
bind Up resize-pane -Z
unbind Down
bind DOWN resize-pane -Z
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
# Update default binding of `Enter` to also use copy-pipe
unbind-key -T copy-mode-vi Space ; bind-key -T copy-mode-vi v send-keys -X begin-selection
unbind-key -T copy-mode-vi Enter ; bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
unbind-key -T copy-mode-vi C-v ; bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
unbind-key -T copy-mode-vi [ ; bind-key -T copy-mode-vi [ send-keys -X begin-selection
unbind-key -T copy-mode-vi ] ; bind-key -T copy-mode-vi ] send-keys -X copy-selection
# OSX keyboard
set -g default-command 'reattach-to-user-namespace $SHELL --login'
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"