-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
77 lines (61 loc) · 2.71 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
# set <Leader>r to refresh the configuration
unbind r
bind r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# set Leader to Ctrl+s (from default Ctrl+b)
set -g prefix C-a
# switch between panes like in vim
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# enable mouse
set -g mouse on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# enable vi mode (required to increase/decrease panes in tmux and escape from lazyterm)
# see https://www.reddit.com/r/neovim/comments/12f3dzo/escaping_to_normal_mode_from_insert_mode_is_not/
set -sg escape-time 10
# use zsh as the default shell
set-option -g default-shell /bin/zsh
# notes on commands:
# ctrl+b :kill-server
# fix weird bug/issue with duplicate input
# https://stackoverflow.com/questions/45931164/duplicated-characters-and-non-updating-input-using-tmux-in-zsh
# set -g default-terminal "screen-256color"
# set 24-bit color, so colors in neovim look correct
set-option -sa terminal-overrides ",xterm*:Tc"
# set status bar position
set-option -g status-position top
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# folke/tokyonight.nvim extras
source-file ~/.tmux/plugins/tokyonight.nvim/extras/tmux/tokyonight_moon.tmux
# https://github.com/joshmedeski/sesh
bind-key "T" run-shell "sesh connect \"$(
sesh list | fzf-tmux -p 55%,60% \
--no-sort --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)' \
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t)' \
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c)' \
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z)' \
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
--bind 'ctrl-d:execute(tmux kill-session -t {})+change-prompt(⚡ )+reload(sesh list)'
)\""
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt, use <leader>x to kill pane
set -g detach-on-destroy off # don't exit from tmux when closing a session
# tmux plugin manager
# install with
# $ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
#
# list of plugins (install with <prefix>I)
set -g @plugin 'tmux-plugins/tpm'
# install packages with <C-s>I
set -g @plugin 'folke/tokyonight.nvim'
set -g @plugin 'christoomey/vim-tmux-navigator' # enable vim-style <C-hjkl> pane switching, also requires vim plugin for this
# set -g @plugin 'tmux-plugins/tmux-sensible' # screws with Wezterm/WSL
set -g @plugin 'tmux-plugins/tmux-yank'
# initialize plugin manager (keep this at the bottom of the tmux.conf)
run '~/.tmux/plugins/tpm/tpm'