-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
131 lines (99 loc) · 3.88 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
126
127
128
129
130
131
set -g prefix C-f
unbind C-b
set -g default-shell /opt/homebrew/bin/fish
set -g focus-events on
set -g popup-border-lines rounded
#unbind system defined prefix
set-option -g renumber-windows on
bind-key C-a send-prefix
# tmux set mouse-utf8 off
# set -g default-terminal "tmux-256color"
# set-option -ga terminal-overrides ",xterm-256color:Tc"
set -ga terminal-overrides ",xterm-256color:Tc"
set-option -sa terminal-overrides ",xterm-256color:RGB"
# set -g default-terminal 'screen-256color'
# set -ga terminal-overrides ',*256col*:Tc'
set-option default-terminal "tmux-256color"
# set -g default-terminal "tmux-256color"
# set -ag terminal-overrides ",alacritty:RGB,xterm-256color:RGB,gnome*:RGB"
bind n new-window -c "#{pane_current_path}"
bind \' split-window -v -c "#{pane_current_path}"
bind m split-window -v -c "#{pane_current_path}" \ sim
bind \" split-window -h -c "#{pane_current_path}"
bind-key u switch-client -l
bind-key -T copy-mode-vi / command-prompt -i -p "search down" "send -X search-forward-incremental \"%%%\""
bind-key -T copy-mode-vi ? command-prompt -i -p "search up" "send -X search-backward-incremental \"%%%\""
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe "pbcopy"
bind P paste-buffer
# search for sessions
bind f display-popup -BE \
"tmux list-sessions | sed -E 's/:.*$//' \
| grep -v \"^$(tmux display-message -p '#S')\$\" \
| fzf --reverse --border=rounded --border-label=' Sessions ' --prompt='' --info=hidden --color=bw --color='pointer:110,border:110,label:110' \
| xargs tmux switch-client -t"
# set -g @t-bind "k"
bind g display-popup -w 95% -h 88% -E "lazygit"
bind G display-popup -w 95% -h 88% -E "gh dash"
# start session number from 1 rather than 0
set -g base-index 1
# start pane number from 1 similar to windows
set -g pane-base-index 1
# Make the current window the first window
bind T swap-window -t 1
# source .tmux.conf file
bind r source-file ~/.tmux.conf \;
# dont mess up with other ctrl-a options by pressing ctrl-a twice
bind C-a send-prefix
# pane movement similar to vim
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# set-option remain-on-exit on
set remain-on-exit off
bind p split-window -h "sim" \; select-pane -L
bind-key -T prefix ! break-pane
# statusbar
set -g status-position top
set -g @plugin "janoamaral/tokyo-night-tmux"
set-option -g status-justify left
set -g status-left ' #S '
set -g status-left-style fg=white
# resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# to cycle through windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind -r C-j swap-pane -t :- \; select-window -t :-
bind -r C-k swap-pane -t :+ \; select-window -t :+
bind b previous-window
# enable mouse
set -g mouse on
# copy to system clipboard
# bind y run "tmux save-buffer - | xclip -i -sel clipboard"
# paste from system clipboard
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# https://github.com/joshmedeski/t-smart-tmux-session-manager
bind-key x kill-pane # skip "kill-pane 2? (y/n)" prompt
set -g detach-on-destroy off # don't exit from tmux when closing a session
set -g @t-fzf-prompt ' '
set -g @fuzzback-popup 1
set -g @fuzzback-popup-size '90%'
setw -g mode-keys vi
# List of plugins
set -g @plugin 'roosta/tmux-fuzzback'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @resurrect-dir '/Users/mart/.config/tmux/resurect'
set -g @continuum-restore 'on'
set -g @resurrect-strategy-nvim 'session'
# set -g @plugin 'joshmedeski/t-smart-tmux-session-manager'
set -g @plugin 'tmux-plugins/tpm'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'