-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
79 lines (57 loc) · 2.52 KB
/
.tmux.conf
File metadata and controls
79 lines (57 loc) · 2.52 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
# if-shell -F '"$KITTY_WINDOW_ID"' \
# 'set -g default-terminal "xterm-kitty"' \
# 'set -g default-terminal "tmux-256color"'
set -g default-terminal "xterm-kitty"
set -g mouse on
set -g history-limit 10000
# Legacy mouse options
# set -g mode-mouse on
# set -g mouse-resize-pane on
# set -g mouse-select-pane on
# set -g mouse-select-window on
# New panes/windows in current path
bind c new-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
bind '\' setw synchronize-panes
bind R source-file ~/.tmux.conf
setw -g mode-keys vi
set -g status-keys emacs
# ctrl-s to go down
unbind-key -T copy-mode-vi C-d
bind-key -T copy-mode-vi C-s send -X halfpage-down
# Stop jumping to bottom while selecting text
#bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection -x
unbind-key -T copy-mode-vi MouseDragEnd1Pane
bind-key -T copy-mode-vi MouseDown1Pane select-pane\; send-keys -X clear-selection
bind -n MouseDrag1Pane if -Ft= '#{mouse_any_flag}' 'if -Ft= \"#{pane_in_mode}\" \"copy-mode -eM\" \"send-keys -M\"' 'copy-mode -eM'
# Stop double clicking copying or jumping to bottom
unbind -T copy-mode-vi DoubleClick1Pane
# Copy with triple click, but don't jump to bottom
#bind -T copy-mode-vi TripleClick1Pane send-keys -X copy-selection -x
unbind -T copy-mode-vi TripleClick1Pane
unbind -n TripleClick1Pane
bind-key -T copy-mode-vi y send -X copy-selection
bind-key C-l send-keys -R \; clear-history \; send-keys C-l
# Swap panes
bind a switch-client -T pane-move
bind -T pane-move Left swap-pane -d -t '{left-of}'
bind -T pane-move Right swap-pane -d -t '{right-of}'
bind -T pane-move Up swap-pane -d -t '{up-of}'
bind -T pane-move Down swap-pane -d -t '{down-of}'
bind -T pane-move Escape switch-client -T root
# Swap split
bind e switch-client -T pane-change-split
bind -T pane-change-split Up move-pane -h -t '.{up-of}'
bind -T pane-change-split Right move-pane -t '.{right-of}'
bind -T pane-change-split Left move-pane -t '.{left-of}'
bind -T pane-change-split down move-pane -h -t '.{down-of}'
# https://stackoverflow.com/questions/15439294/tmux-switch-the-split-style-of-two-adjacent-panes
set -g @plugin 'roosta/tmux-fuzzback'
# set -g @plugin 'laktak/extrakto'
# set -g @extrakto_insert_key "enter"
# set -g @extrakto_copy_key "tab"
# Enable this if wl-clip or xclip are not found
# set -g @extrakto_clip_mode tmux_osc52
# bind-key -n C-] run-shell "~/.tmux/plugins/extrakto/scripts/open.sh \"#{pane_id}\""
run '~/.tmux/plugins/tpm/tpm'