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