-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmuxrc
90 lines (74 loc) · 2.91 KB
/
tmuxrc
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
# set -g default-command "${SHELL}"
set -g history-limit 500000
set -s escape-time 0
# When moving to a new pane, move one at a time and stop movement. Without this
# option any subsequent arrow keys will continue moving
set -g repeat-time 0
set-window-option -g xterm-keys on
# Resize window when terminal size changes, even if coming from smaller client
set-window-option -g aggressive-resize
# UI
set -s default-terminal "xterm-256color"
set -ga terminal-overrides ",st-256color:Tc"
set -g status-position top
set -g status-style 'fg=colour16 bg=colour109 bold'
setw -g window-status-current-style 'fg=colour16 bg=colour103 bold'
set -g pane-border-style 'fg=colour109 bg=colour16'
set -g pane-active-border-style 'fg=colour103 bg=colour16'
set -g message-style 'fg=colour223 bg=colour90 bold'
# color for activity monitor
set-window-option -ga window-status-activity-style fg=colour110,bg=colour16
set -g status-left " "
set -g status-right "#[bg=colour233,fg=colour$THIS_HOST_COLOR,dim] $HOSTNAME "
# Auto-set title (overrideable with window-rename)
set-option -g automatic-rename on
set -g visual-bell off
set -g visual-activity off
set -g visual-silence off
# Highlight a window with activity
setw -g monitor-activity on
# # Destroy all keybindings
# #unbind-key -a
#
# # Set prefix key, to ensure some kind of menu is always available
# set-option -g prefix M-b
# bind-key M-b send-prefix
#
# # pane select and resize
# bind -n M-Up select-pane -U
# bind -n M-Down select-pane -D
# bind -n M-Left select-pane -L
# bind -n M-Right select-pane -R
# bind -n S-M-Up resize-pane -U
# bind -n S-M-Down resize-pane -D
# bind -n S-M-Left resize-pane -L
# bind -n S-M-Right resize-pane -R
#
# bind -n M-\\ split -h
# bind -n M-\- split -v
#
# window management
bind -n M-t new-window
bind -n M-NPage next-window
bind -n M-PPage previous-window
# # Window move: S-M seems to trigger a shortcut in Fedora
bind -n C-M-NPage swap-window -t +1\; select-window -t +1
bind -n C-M-PPage swap-window -t -1\; select-window -t -1
bind -n M-r command-prompt "rename-window '%% '"
# Binding to clear history and scrollback
bind -n M-k send-keys -R \; clear-history
# Enable mouse; pane-scrolling, window resize, etc
set -g mouse on
# Better copy and scrollback mode
unbind -T copy-mode-vi MouseDragEnd1Pane
bind-key -T copy-mode-vi y send-keys -X copy-selection
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi V send -X select-line
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Copy buffer history to a file
bind-key a capture-pane -S - \; save-buffer ~/tmuxbuf.txt \; display "Buffer history saved to ~/tmuxbuf.txt"