-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
100 lines (72 loc) · 2.43 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
# Documentation
#
# -r -> repeatable command (if you hold the prefix key down)
# Unbind normal prefix (ctrl-b) and set it to ctrl-a
unbind C-b
set -g prefix C-a
bind-key a send-prefix
# Set the time in milliseconds for which tmux waits after an escape is input to
# determine if it is part of a function or meta key sequences. The default is
# 500 milliseconds.
set -s escape-time 0
# Use vim bindings in copy mode
setw -g mode-keys vi
# Terinal options
#set -g default-terminal "xterm-256color"
#set-option -g default-command "zsh"
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# .tmux.conf
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind-key M split-window -h "vim ~/.tmux.conf"
# Send the same key-presses to all panes (useful for remote boxes)
bind-key S set-window-option synchronize-panes
set-window-option -g clock-mode-style 12
unbind %
unbind &
# Split panes/windows
bind h split-window -v
bind v split-window -h
# Don't kill a window without asking first
bind k confirm-before kill-window
unbind q
bind q confirm-before kill-server
# Create new window
bind-key c new-window -n ''
# Setup default naming of windows
set-window-option -g automatic-rename off
set-option -g allow-rename off
# Resize panes
bind-key -r J resize-pane -D 10
bind-key -r K resize-pane -U 10
bind-key -r H resize-pane -L 10
bind-key -r L resize-pane -R 10
# Swap windows
# bind-key -r [ swap-window -t -1
# bind-key -r ] swap-window -t +1
# Switch sessions
bind-key -r C-j switch-client -n
bind-key -r C-k switch-client -p
# Switch panes (by number)
bind-key j display-panes
# Cycle pane layout
bind-key C-space next-layout
# How many lines each window remembers
set -g history-limit 10000
# Look and Feel
# set -g status-bg default
# set -g status-fg green
# set -g pane-active-border-bg default
# set -g pane-active-border-fg #262825
# set -g pane-active-border-style fg=colour235
set -g pane-active-border-style fg="#262825"
# set -g pane-border-bg default
# set -g pane-border-fg colour235
set -g pane-border-style fg=colour235
set -g status-right "#(whoami)@#H"
set -g status-style bg=default,fg="#999999"
# Toggle zoom/full-screen for a pane (without losing other panes)
unbind space
bind-key space resize-pane -Z # toggle zoom
# Status line (with toggle options for zoom)
set-option -gw window-status-current-format '#I:#W#F#{?window_zoomed_flag,#[fg=red]oom⚫#[default],}'