forked from matthewtodd/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtmux.conf.sym
More file actions
118 lines (94 loc) · 3.55 KB
/
tmux.conf.sym
File metadata and controls
118 lines (94 loc) · 3.55 KB
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
# Ensure clipboard works in os x sierra: https://github.com/tmux/tmux/issues/543#issuecomment-248980734
set -g default-shell $SHELL
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
# M-Space as prefix
set-option -g prefix M-Space
unbind-key C-b
bind-key M-Space send-prefix
# Reload key
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config.'
set -g history-limit 8096
# unbind-key -n M-left
# unbind-key -n M-right
# unbind-key -n M-S-left
# unbind-key -n M-S-right
# unbind-key -n M-up
# unbind-key -n M-down
# unbind-key -n M-S-up
# unbind-key -n M-S-down
# Use `od -t x1` in a tmux pane and type the bound keys to determine which hex bytes iTerm should send. N.B `1b 20` is the escape sequence.
# See also https://medium.freecodecamp.org/tmux-in-practice-iterm2-and-tmux-integration-7fb0991c6c01, and https://github.com/tmux/tmux/wiki/Modifier-Keys
bind-key M-left select-pane -L
bind-key M-right select-pane -R
bind-key M-S-left resize-pane -L 5
bind-key M-S-right resize-pane -R 5
bind-key M-up select-pane -U
bind-key M-down select-pane -D
bind-key M-S-up resize-pane -U 5
bind-key M-S-down resize-pane -D 5
bind-key -n M-tab next-window
bind-key -n C-M-y previous-window # for some reason by default iterm2 sends this for M-S-tab
### run-command
bind-key ` command-prompt "run-shell '%%'"
bind-key M-v copy-mode
bind-key C-space copy-mode
bind-key C-r copy-mode
# unbind-key C-v
# bind-key C-v showb > /tmp/tmux_buffer
# bind-key C-p pipe-pane -o 'cat >>~/tmux.#I-#P'
# THEME
WEATHER='#(curl -s wttr.in/27540\?format\="%%l:+%%c%%20%%t%%60%%w&period=60")'
set -g status-bg white
set -g status-fg black
set -g status-interval 5
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #H#[default] ⋮'
set -g status-right-length 71
set -g status-right "#[fg=blue]#(date +'%%Y-%%m-%%dT%%H:%%M:%%S %%Z') #[fg=colour93]#(TZ=US/Pacific date +'%%Y-%%m-%%dT%%H:%%M:%%S %%Z') #[fg=green]#(TZ=UTC date +'%%Y-%%m-%%dT%%H:%%M:%%S %%Z')"
set -g window-status-current-style bg=red
set -g pane-border-style fg=default
set -g pane-active-border-style fg=colour33,bg=colour33
set -g default-terminal "xterm-256color"
# open a man page in new window
bind-key / command-prompt "new-window 'exec man %%'"
# # instructs tmux to expect UTF-8 sequences
# setw -g utf8 on
# xterm-style function key sequences
setw -g xterm-keys on
# detach client
bind-key d detach
bind-key C-d detach
# Set window notifications
setw -g monitor-activity on
# #bind-key b "save-buffer /tmp/tmux-buffer" "exec sh -c 'pbcopy < /tmp/tmux-buffer'"
# bind-key b save-buffer /tmp/tmux-buffer \; run-shell "cat /tmp/tmux-buffer | pbcopy"
# set -g default-shell ${HOMEBREW_HOME}/bin/zsh
# set -g default-command "reattach-to-user-namespace -l zsh"
# set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# # From: http://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/
# # Toggle mouse on with ^Z m
# bind m \
# set -g mode-mouse on \;\
# set -g mouse-resize-pane on \;\
# set -g mouse-select-pane on \;\
# set -g mouse-select-window on \;\
# display 'Mouse: ON'
# # Toggle mouse off with ^Z M
# bind M \
# set -g mode-mouse off \;\
# set -g mouse-resize-pane off \;\
# set -g mouse-select-pane off \;\
# set -g mouse-select-window off \;\
# display 'Mouse: OFF'
# unbind +
# bind + \
# new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
# swap-pane -s tmux-zoom.0 \;\
# select-window -t tmux-zoom
# unbind -
# bind - \
# last-window \;\
# swap-pane -s tmux-zoom.0 \;\
# kill-window -t tmux-zoom