-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
89 lines (63 loc) · 2.59 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
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color*:Tc"
# remap prefix from 'C-b' to 'C-s'
unbind C-b
set-option -g prefix C-s
bind-key C-s send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
set -s escape-time 0
# reload config file (change file location to your the tmux.conf you want to use)
unbind r
bind r source-file ~/.tmux.conf
bind -r j resize-pane -D 6
bind -r k resize-pane -U 7
bind -r l resize-pane -R 7
bind -r h resize-pane -L 7
bind -r m resize-pane -Z
# Enable mouse
set -g mouse on
set-window-option -g mode-keys vi
set-option -g xterm-keys on
#numbers should start at 1
set -g base-index 1
set -g pane-base-index 1
setw -g pane-base-index 1
bind-key s choose-tree -ZsK '#{?#{e|<:#{line},9},#{e|+:1,#{line}},#{?#{e|<:#{line},35},M-#{a:#{e|+:97,#{e|-:#{line},9}}},}}'
# copy mode
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -selection clipboard -in"
bind -T copy-mode-vi Enter send -X copy-selection-and-cancel
# set path directory to current pane
bind v attach-session -c "#{pane_current_path}"
# bind-key l run-shell 'tmux split-window -v -l 50 -c "#{pane_current_path}" "lazygit"'
bind-key t run-shell 'tmux neww "cd #{pane_current_path}; btop"'
bind-key y run-shell 'tmux neww "cd #{pane_current_path}; yazi"'
bind-key l run-shell 'tmux neww "cd #{pane_current_path}; lazygit"'
bind-key q run-shell 'tmux neww "cd #{pane_current_path}; ~/.tinyquery/tmux_laucher.sh"'
# remove delay for exiting insert mode with ESC in Neovim
set -sg escape-time 12
# tpm plugin
set -g @plugin 'tmux-plugins/tpm'
# list of tmux plugins
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart
set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 17 minutes
set -g @plugin 'iliutaadrian/commit-ch-tmux'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'
# open url in browser
bind-key C-u run-shell -b "tmux capture-pane -J -p | grep -oE '(https?):\/\/.*[^>]' | fzf-tmux -d20 --multi --bind alt-a:select-all,alt-d:deselect-all | xargs open"
# themes
set -g @themepack 'powerline/default/cyan'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
run '~/.tmux/plugins/tpm/tpm'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)