tmux/.tmux.conf 3.2 K raw
1
set -g default-terminal "xterm-256color"
2
set-option -ga terminal-overrides ",xterm-256color:Tc"
3
set -ga terminal-overrides ",xterm-256color:Tc"
4
set -g extended-keys on
5
set -g extended-keys-format csi-u
6
7
# action key
8
unbind C-b
9
set -g prefix C-q
10
set-option -g repeat-time 0
11
12
set -g @tpm-clean 'u'
13
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt
14
set -g detach-on-destroy off  # don't exit from tmux when closing a session
15
16
# Plugins
17
set -g @tpm_plugins '
18
tmux-plugins/tpm
19
tmux-plugins/tmux-sensible
20
christoomey/vim-tmux-navigator
21
'
22
# set -g @plugin 'joshmedeski/t-smart-tmux-session-manager'
23
# set -g @t-fzf-prompt '󰍉 '
24
25
# bind-key "T" display-popup -E "sesh connect \"(
26
#  sesh list -i | gum filter --limit 1 --placeholder "Choose a session" --height 50 --prompt="> " --indicator.foreground="2" --match.foreground="2"
27
# )\""
28
29
bind-key "T" run-shell "sesh connect \"$(
30
  sesh list --icons --hide-duplicates | fzf-tmux --no-sort --reverse \
31
    -p 100%,100% --ansi --padding 0,1 --prompt='󰘧  ' \
32
    --border=none --input-border=rounded --preview-border=rounded \
33
    --header '^a all ^t tmux ^g configs ^x zoxide ^f find ^d kill' \
34
    --bind 'tab:down,btab:up' \
35
    --bind 'ctrl-a:reload(sesh list --icons --hide-duplicates)' \
36
    --bind 'ctrl-t:reload(sesh list -t --icons)' \
37
    --bind 'ctrl-g:reload(sesh list -c --icons)' \
38
    --bind 'ctrl-x:reload(sesh list -z --icons)' \
39
    --bind 'ctrl-f:reload(fd -H -d 2 -t d -E .Trash . ~)' \
40
    --bind 'ctrl-d:execute(tmux kill-session -t {2..})+reload(sesh list --icons --hide-duplicates)' \
41
    --preview 'sesh preview {}' --preview-window 'right:55%' \
42
)\""
43
44
bind-key b set-option status
45
46
set-window-option -g mode-keys vi
47
48
# turn on mouse
49
set -g mouse on
50
51
#bind t send-key C-t
52
# Reload settings
53
bind r source-file ~/.tmux.conf \; display "Reloaded!"
54
# Open current directory
55
bind o run-shell "open #{pane_current_path}"
56
bind -r e kill-pane -a
57
58
# vim-like pane switching
59
bind -r k select-pane -U
60
bind -r j select-pane -D
61
bind -r h select-pane -L
62
bind -r l select-pane -R
63
64
# Moving window
65
bind-key -n C-S-Left swap-window -t -1 \; previous-window
66
bind-key -n C-S-Right swap-window -t +1 \; next-window
67
68
# Resizing pane
69
bind -r K resize-pane -U 5
70
bind -r J resize-pane -D 5
71
bind -r H resize-pane -L 5
72
bind -r L resize-pane -R 5
73
74
# Start windows and panes at 1, not 0
75
set -g base-index 1
76
set -g pane-base-index 1
77
set-window-option -g pane-base-index 1
78
set-option -g renumber-windows on
79
80
# Opens split panes in current path
81
bind '"' split-window -v -c "#{pan_current_path}"
82
bind % split-window -h -c "#{pane_current_path}"
83
84
85
#set-option utf8-default on
86
#set-option -g mouse-select-pane
87
set-window-option -g mode-keys vi
88
#set-window-option -g utf8 on
89
# look'n feel
90
set-option -g status-position "top"
91
set-option -g status-style bg=colour0,fg=default
92
set-option -g status-justify centre
93
set-option -g status-left '#[bg=default,fg=default,bold]#{?client_prefix,,  󰘧  }#[bg=default,fg=colour3,bold]#{?client_prefix,  󰘧  ,}'
94
set-option -g status-right '#S'
95
set-option -g window-status-format '#[bg=colour0,fg=colour2] 󰝣 #W '
96
set-option -g window-status-current-format '#[bg=colour0,fg=colour3] 󰝤 #W#{?window_zoomed_flag,  , }'
97
98
99
run '~/.tmux/plugins/tpm/tpm'