-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.tmux.conf
executable file
·126 lines (116 loc) · 4.53 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
## keybindings
unbind C-b
unbind C-a
unbind %
unbind ,
unbind .
unbind n
unbind p
unbind [
unbind '"'
unbind l
unbind &
unbind "'"
#unbind -T root WheelUpPane
#unbind -T root WheelDownPane
set -g prefix C-a
bind-key C-a last-window
bind | split-window -h
bind - split-window -v
bind x kill-pane
bind X kill-window
bind-key -n C-_ display-panes
if-shell 'test "$(uname)" = "Darwin"' 'bind -n "KP*" resize-pane -Z'
if-shell 'test "$(uname)" = "Linux"' 'bind -n "C-y" resize-pane -Z'
bind , previous-window # <
bind . next-window # >
bind < swap-window -t :-
bind > swap-window -t :+
bind n command-prompt 'rename-window %%'
bind N command-prompt 'rename-session %%'
bind Escape copy-mode
bind r source-file ~/.tmux.conf; display " ✱ ~/.tmux.conf is reloaded"
bind R refresh-client
bind a send-key C-a
bind C-a last-window
bind C-j resize-pane -L 5
bind C-l resize-pane -R 5
bind -n C-k clear-history
# bind C-k resize-pane -D 5
# bind C-i resize-pane -U 5
bind e send-prefix
bind w split-window "tmux lsw | selecta | cut -d':' -f 1 | xargs tmux select-window -t"
bind-key -n C-0 select-window -t :0
bind-key -n C-1 select-window -t :1
bind-key -n C-2 select-window -t :2
bind-key -n C-3 select-window -t :3
bind-key -n C-4 select-window -t :4
bind-key -n C-5 select-window -t :5
bind-key -n C-6 select-window -t :6
bind-key -n C-7 select-window -t :7
bind-key -n C-8 select-window -t :8
bind-key -n C-9 select-window -t :9
setw -g mouse on
#bind-key -n End send-key C-e
#bind-key -n Home send-key C-a
bind-key -T root -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' \"send-keys -M ; send-keys -M ; send-keys -M ;\" \"copy-mode -t=\""
bind-key -T root -n WheelDownPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' \"send-keys -M ; send-keys -M ; send-keys -M ;\" \"send-keys -M ; send-keys -M ; send-keys -M ;\""
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y if-shell "test ! -z $KITTY_WINDOW_ID" "send-keys -X copy-pipe-and-cancel 'kitty +kitten clipboard'" "send-keys -X copy-pipe-and-cancel 'pbcopy'"
bind-key -T copy-mode-vi MouseDragEnd1Pane if-shell "test ! -z $KITTY_WINDOW_ID" "send-keys -X copy-pipe-and-cancel 'kitty +kitten clipboard'" "send-keys -X copy-pipe-and-cancel 'pbcopy'"
unbind-key -T copy-mode-vi Enter
unbind-key -T copy-mode-vi n
bind-key -T copy-mode-vi Enter if-shell "test ! -z $KITTY_WINDOW_ID" "send-keys -X copy-pipe-and-cancel 'kitty +kitten clipboard'" "send-keys -X copy-pipe-and-cancel 'pbcopy'"
bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
# basic options
set -g history-limit 100000
set -g default-terminal "screen-256color"
set -g status-keys vi
setw -g mode-keys vi
setw -g xterm-keys on
set -g bell-action none
set -g visual-bell off
set -g base-index 1
set -g pane-base-index 1 # start pane indices at 1
set -sg escape-time 0
# look and feel
set -g status-bg colour11
set -g status-fg colour8
set -g default-shell $SHELL
set-option -g default-command "/usr/local/bin/zsh"
set-option -g renumber-windows on
set -g status-style bg=cyan
setw -g window-status-current-style "bg=green,bold,fg=white"
set -g set-titles on
set -g set-titles-string '#S:#I #W' # window number,program name,active (or not)
setw -g automatic-rename off # auto name
set -g allow-rename off # auto name
set -g focus-events on
set -g status-justify left
set -g status-style bg=black,fg=cyan
set -g status-interval 5
set -g status-left ' #[bold]❐ #S#[default] ⡇'
set -g status-right '#[bold]#(whoami) ● #H#[default] '
set -g status-right-length 60
set -g status-left-length 60
## highlight active window
set-window-option -g window-status-current-style bg=colour166,fg=colour15,bold
set-window-option -g pane-active-border-style ''
## pane border and colors
set -g pane-active-border-style fg=yellow
set -g pane-border-style fg=white
setw -g mode-style bg=magenta,fg=black
set -g message-style bg=magenta,fg=black
set -g @resurrect-processes ':all:'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
set -g @continuum-save-interval '2'
set -g @continuum-restore 'on'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-cowboy'
run '~/.tmux/plugins/tpm/tpm'