tmux/.tmux.conf 2.4 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-option -g default-shell /opt/homebrew/bin/nu
5
6
# action key
7
unbind C-b
8
set -g prefix `
9
bind ` send-prefix
10
11
set -g @tpm-clean 'u'
12
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt
13
set -g detach-on-destroy off  # don't exit from tmux when closing a session
14
15
# Plugins
16
set -g @plugin 'tmux-plugins/tpm'
17
set -g @plugin 'tmux-plugins/tmux-sensible'
18
# set -g @plugin 'joshmedeski/t-smart-tmux-session-manager'
19
set -g @plugin 'christoomey/vim-tmux-navigator'
20
# set -g @t-fzf-prompt '󰍉 '
21
22
bind-key "T" display-popup -E "sesh connect \"$(
23
  sesh list -i | gum filter --limit 1 --placeholder "Choose a session" --height 50 --prompt="> " --indicator.foreground="2" --match.foreground="2"
24
)\""
25
26
bind-key b set-option status
27
28
set-window-option -g mode-keys vi
29
30
# turn on mouse
31
set -g mouse on
32
33
#bind t send-key C-t
34
# Reload settings
35
bind r source-file ~/.tmux.conf \; display "Reloaded!"
36
# Open current directory
37
bind o run-shell "open #{pane_current_path}"
38
bind -r e kill-pane -a
39
40
# vim-like pane switching
41
bind -r k select-pane -U
42
bind -r j select-pane -D
43
bind -r h select-pane -L
44
bind -r l select-pane -R
45
46
# Moving window
47
bind-key -n C-S-Left swap-window -t -1 \; previous-window
48
bind-key -n C-S-Right swap-window -t +1 \; next-window
49
50
# Resizing pane
51
bind -r C-k resize-pane -U 5
52
bind -r C-j resize-pane -D 5
53
bind -r C-h resize-pane -L 5
54
bind -r C-l resize-pane -R 5
55
56
# Start windows and panes at 1, not 0
57
set -g base-index 1
58
set -g pane-base-index 1
59
set-window-option -g pane-base-index 1
60
set-option -g renumber-windows on
61
62
# Opens split panes in current path
63
bind '"' split-window -v -c "#{pan_current_path}"
64
bind % split-window -h -c "#{pane_current_path}"
65
66
67
#set-option utf8-default on
68
#set-option -g mouse-select-pane
69
set-window-option -g mode-keys vi
70
#set-window-option -g utf8 on
71
# look'n feel
72
set-option -g status-position "top"
73
set-option -g status-style bg=colour0,fg=default
74
set-option -g status-justify centre
75
set-option -g status-left '#[bg=default,fg=default,bold]#{?client_prefix,,    }#[bg=default,fg=colour3,bold]#{?client_prefix,    ,}'
76
set-option -g status-right '#S'
77
set-option -g window-status-format '#[bg=colour0,fg=colour2] 󰝣 #W '
78
set-option -g window-status-current-format '#[bg=colour0,fg=colour3] 󰝤 #W#{?window_zoomed_flag,  , }'
79
80
81
run '~/.tmux/plugins/tpm/tpm'