-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexecutable_dot_tmux.conf
113 lines (92 loc) · 3.9 KB
/
executable_dot_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
# bind prefix to C-a
set -g mouse on
set -g default-terminal "tmux-256color"
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
unbind t
# Sesh
bind-key "t" run-shell "sesh connect \"$(
sesh list --icons | fzf-tmux -p 55%,60% \
--no-sort --ansi --border-label ' sesh ' --prompt '⚡ ' \
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
--bind 'tab:down,btab:up' \
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)' \
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)' \
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \
)\""
bind -N "last-session (via sesh) " L run-shell "sesh last"
# Yazi
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
# Easy reload config
bind r source-file ~/.tmux.conf
# create session
bind C-c new-session
bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
# switch panes using Alt-arrow without prefix
bind -r h select-pane -L
bind -r l select-pane -R
bind -r k select-pane -U
bind -r j select-pane -D
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# pane resizing
bind -r H resize-pane -L 3
bind -r J resize-pane -D 3
bind -r K resize-pane -U 3
bind -r L resize-pane -R 3
# window navigation
unbind n
unbind p
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind -r C-S-H swap-window -t -1 \; select-window -t -1 # swap current window with the previous one
bind -r C-S-L swap-window -t +1 \; select-window -t +1 # swap current window with the next one
bind Tab last-window # move to last active window
bind Enter copy-mode # enter copy mode
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi C-v send -X rectangle-toggle
bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi Escape send -X cancel
bind -T copy-mode-vi H send -X start-of-line
bind -T copy-mode-vi L send -X end-of-line
# bind-key -n M-g if-shell -F '#{==:#{session_name},#{b:pane_current_path}}' {
bind-key g if-shell -F '#{==:#{session_name},#{b:pane_current_path}}' {
detach-client
} {
display-popup -d "#{pane_current_path}" -xC -yC -w 90% -h 85% -E 'tmux new-session -A -s (tmux display-message -p "#{b:pane_current_path}")'
}
bind-key v next-layout
bind-key -T copy-mode-vi v send-keys -X begin-selection
set -g @easy-motion-prefix "Space"
set -g @catppuccin_flavor 'mocha'
set -g @catppuccin_window_status_style "rounded"
# Make the status line pretty and add some modules
set -g status-right-length 100
set -g status-left-length 100
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_application}"
# set -agF status-right "#{E:@catppuccin_status_cpu}"
set -ag status-right "#{E:@catppuccin_status_session}"
set -ag status-right "#[fg=#{@thm_crust},bg=#{@thm_teal}] #H"
# set -agF status-right "#{E:@catppuccin_status_battery}"
set -g @override_copy_command 'clip.exe'
set -g @continuum-restore 'on'
set -g detach-on-destroy off
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
run-shell ~/.config/tmux/plugins/tmux-resurrect/resurrect.tmux
run-shell ~/.config/tmux/plugins/tmux-continuum/continuum.tmux
run-shell ~/.config/tmux/plugins/tmux-copycat/copycat.tmux
run-shell ~/.config/tmux/plugins/tmux-yank/yank.tmux
run-shell ~/.config/tmux/plugins/tmux-easy-motion/easy_motion.tmux
run-shell ~/.config/tmux/plugins/tmux-sessionx/sessionx.tmux