-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
115 lines (94 loc) · 4.59 KB
/
.tmux.conf
File metadata and controls
115 lines (94 loc) · 4.59 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
# .tmux.conf
# See https://fburl.com/tmux for more info.
# set -g default-command "${SHELL}"
set -g history-limit 500000
set -g default-terminal "tmux-256color"
set -ga terminal-features ",xterm-256color:RGB"
set -ga terminal-features ",tmux-256color:RGB"
# Keybind preference
setw -g mode-keys vi
set-option -g status-keys vi
set -g @tmux_sep_right ""
set -g @tmux_sep_left ""
set -g @tmux_sep_mid ""
set -g @tmux_sep_window ""
# Vim-like key bindings for pane navigation (default uses cursor keys).
unbind h
bind h select-pane -L
unbind j
bind j select-pane -D
unbind k
bind k select-pane -U
unbind l # normally used for last-window
bind l select-pane -R
# Resizing (mouse also works).
unbind Left
bind -r Left resize-pane -L 5
unbind Right
bind -r Right resize-pane -R 5
unbind Down
bind -r Down resize-pane -D 5
unbind Up
bind -r Up resize-pane -U 5
# Intuitive window-splitting keys.
bind | split-window -h -c '#{pane_current_path}' # normally prefix-%
bind \\ split-window -h -c '#{pane_current_path}' # normally prefix-%
bind - split-window -v -c '#{pane_current_path}' # normally prefix-"
bind = split-window -h -c '#{pane_current_path}' # normally prefix-"
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
# bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
unbind -n C-j
# bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
unbind -n C-k
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# Set prefix to space.
unbind C-b
set -g prefix C-Space
# Fast toggle (normally prefix-l).
bind ^space last-window
# Clock mode
# setw -g clock-mode-colour cyan
# Messages
set -g message-style fg=white,bg=black
set -g message-command-style fg=white,bg=black
# Prefix highlight
set -g @prefix_highlight_output_prefix "#[fg=brightcyan]#[bg=black]#[nobold]#[noitalics]#[nounderscore]#{@tmux_sep_left}#[bg=brightcyan]#[fg=black]"
set -g @prefix_highlight_output_suffix "#{@tmux_sep_left}"
set -g @prefix_highlight_copy_mode_attr "fg=brightcyan,bg=black,bold"
# Status bar.
set -g status-style bg=black,fg=white,none
set -g status-left "#[fg=white,bg=blue] #S#[fg=blue,bg=black]#{@tmux_sep_right}"
set -g status-right "#{prefix_highlight}#[fg=blue,bg=black,nobold,noitalics,nounderscore]#{@tmux_sep_left}#[fg=white,bg=blue] %m-%d #[fg=black,bg=blue,nobold,noitalics,nounderscore]#{@tmux_sep_mid}#[fg=white,bg=blue] %H:%M "
# Update the status bar every 10 seconds (default is 15)
set-option -g status-interval 10
# Highlight active window.
set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore]#{@tmux_sep_right} #[fg=white,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore]#{@tmux_sep_window} #[fg=white,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]#{@tmux_sep_right}"
set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore]#{@tmux_sep_right} #[fg=black,bg=brightblack]#I #[fg=black,bg=brightblack,nobold,noitalics,nounderscore]#{@tmux_sep_window} #[fg=black,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#{@tmux_sep_right}"
set -g window-status-separator ""
set -g pane-active-border-style bg=default,fg=cyan
# Mouse can be used to select panes, select windows (by clicking on the status
# bar), resize panes. For default bindings see tmux list-keys and `tmux
# list-keys -t vi-copy`.
set -g mouse on
# Don't try to name client terminal windows/tabs
set -g set-titles off
set -g allow-rename off
# Needed as on tmux 1.9 and up (defaults to off).
# Added in tmux commit c7a121cfc0137c907b7bfb.
set -g focus-events on
# Dynamically rename windows with dir info
# This doesn't work with oh-my-zsh
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Renumber windows on delete/move events
set-option -g renumber-windows on
# Don't wrap searches; it's super confusing given tmux's reverse-ordering of
# position info in copy mode.
set -w -g wrap-search off
# clipper
# Vim-like key bindings for selection
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'C-v' send -X rectangle-toggle
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "nc -N localhost 8377"