-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tmux
More file actions
113 lines (90 loc) · 4.08 KB
/
main.tmux
File metadata and controls
113 lines (90 loc) · 4.08 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
# automatically update tmux window titles to reflect currently executing command
# requires proper shell configuration
#set-window-option -g automatic-rename on
## more screen-like bindings
# use <C-a> instead of <C-b>
unbind C-b
set-option -g prefix C-a
bind-key C-a last-window \; source-file "${tmux_functions_home}/_mode-unset.tmux"
# allow <C-a>a to pass through an actual <C-a>
bind-key a send-prefix
bind-key A command-prompt "rename-window %%"
unbind c
bind-key c new-window \; command-prompt -p "new window name:" "rename-window %%"
bind-key C new-window \; rename-window new
# additional window navigation bindings
bind-key v split-window -h
bind-key ! break-pane \; command-prompt -p "broken pane name:" "rename-window %%"
bind-key C-i select-pane -t :.+
bind-key Tab select-pane -t :.+
bind-key / list-windows\; command-prompt "swap-window -t '%%'; send-keys 'Enter'"
bind-key g switch-client -l
bind-key C-g switch-client -n
unbind l
bind-key h select-pane -L
bind-key j select-pane -U
bind-key k select-pane -D
bind-key l select-pane -R
bind-key C-l select-pane -R
bind-key C-p last-window
unbind C-o
bind-key r rotate-window
bind-key C-o display-panes
unbind x
bind-key x confirm-before -p "kill pane '#W.#P'? (y/n)" "kill-pane"
bind-key X confirm-before -p "kill or unlink window '#W'? (y/n)" "unlink-window -k"
bind-key '`' resize-pane -t 0 -y 5 \; resize-pane -t 2 -y 5
# Reload .tmux.conf
bind-key R source-file "${tmux_conf_home}/.tmux.conf" \; display-message "Reloaded tmux configuration."
# Silent reload .tmux.conf (debug)
bind-key C-r source-file "${tmux_conf_home}/.tmux.conf"
# Reload test configuration
bind-key C-t source-file "${tmux_functions_home}/test.tmux"
# Session Management
bind-key Q list-windows\; confirm-before -p "kill-session '#S'? (y/n)" "kill-session; send-keys 'Enter'"
#bind-key S command-prompt -p "Session name:" "set-environment -g tmux_session_selection '%%'; source-file ${tmux_functions_home}/_select-session_pre.tmux"
bind-key S command-prompt -p "Session name:" "set-environment -g tmux_session_selection '%%'; source-file ${tmux_functions_home}/select-session.tmux"
bind-key '$' command-prompt -p "Session name (#S):" "rename-session '%%'"
bind-key W list-windows -a\; command-prompt -p "link window:" "link-window -s '%%'; send-keys 'Enter'"
bind-key P command-prompt -p "Profile to load:" "set-environment -g tmux_profile_selection '%%'; source-file ${tmux_functions_home}/load-profile.tmux"
bind-key F command-prompt -p "Function to load:" "set-environment -g tmux_function_selection '%%'; source-file ${tmux_functions_home}/load-function.tmux"
# set vi keys
set-window-option -g mode-keys vi
bind-key [ copy-mode \; display-message "Copy mode"
bind-key Escape copy-mode\; display-message "Copy mode"
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
if-shell "test -x /usr/local/bin/reattach-to-user-namespace" 'bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"'
# miscellaneous global options
set-option -g history-limit 50000
set-option -g display-time 1500
set-window-option -g monitor-activity off
set-option -g default-terminal "screen-256color"
set-window-option -g aggressive-resize on
set-option -g detach-on-destroy off
#set-option -g update-environment "SSH_AUTH_SOCK SSH_AGENT_PID FOO"
set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TMUX_CLIENT_NAME SSH_TTY"
set-option -g focus-events on
# Experimental
#bind-key I join-pane -h -p 25 -s main:w.bottom -t :.right
#bind-key T join-pane -d -s :.right -t main:w.bottom
# free bindings
#T, M, u
unbind t
unbind w
unbind i
unbind s
# modes
bind-key f source-file "${tmux_functions_home}/mode-app.tmux"
bind-key m source-file "${tmux_functions_home}/mode-move.tmux"
# renumber windows removing gaps
#bind-key C-l move-window -r
# Zoom pane
bind-key z resize-pane -Z
# Powerline
#source-file "${HOME}/powerline/powerline/bindings/tmux/powerline.conf"
# Load default session
source-file ${tmux_functions_home}/load-default-session.tmux
# Load theme
source-file ${tmux_functions_home}/load-default-theme.tmux
# vim: ft=tmux