This is my configuration for tmux. I just use the basic features and some plugins to make it more useful and readable. It's still WIP, so I'll update it as I find new features and plugins.
tmuxtpmstowgit
Run this command to install the config and tpm:
#!/bin/bash
git clone https://github.com/davidbasilefilho/basile.tmux.git ~/tmux
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
cd ~/tmux
stow .The configuration file is located at ~/.tmux.conf.
set-option -ga terminal-overrides ",xterm-256color:Tc"
set -g default-terminal "tmux-256color"Bind leader, add reload config binding, enable mouse support for resizing panes, and add vim keys for navigating.
set -g prefix C-s
unbind r
bind r source-file ~/.tmux.conf
set-option -g base-index 1 # start window from 1
set -g mouse on
setw -g mode-keys vi
bind-key -n M-K swap-pane -U
bind-key -n M-J swap-pane -D
bind-key -n M-h resize-pane -L 4
bind-key -n M-j resize-pane -D 2
bind-key -n M-k resize-pane -U 2
bind-key -n M-l resize-pane -R 4
unbind %
unbind '"'
unbind p
bind-key p switch-client -T p-table
bind-key -T p-table v split-window -h -c "#{pane_current_path}"
bind-key -T p-table h split-window -v -c "#{pane_current_path}"
bind-key -T p-table l list-sessions
unbind w
bind w switch-client -T w-table
bind-key -T w-table n new-window
bind-key -T w-table l list-windows
bind-key -T w-table g new-window -c "#{pane_current_path}" "lazygit"
bind-key -T w-table r command-prompt "rename-window '%%'"
bind-key -T w-table b break-pane
bind-key -T w-table c confirm-before kill-window
bind-key -T w-table > rotate-window
bind-key -T w-table < rotate-window -D
unbind j
bind j switch-client -T j-table
bind-key -T j-table h command-prompt -p "Join pane from window horizontally:" "join-pane -s '%%'"
bind-key -T j-table v command-prompt -p "Join pane from window vertically:" "join-pane -s '%%'"Seemlessly navigate between vim and tmux!
set -g @plugin 'christoomey/vim-tmux-navigator'Install and setup Catppuccin and its status bar options.
set -g @plugin 'catppuccin/tmux#v2.1.2'
set -g @catppuccin_flavor 'macchiato' # latte, frappe, macchiato or mocha
set -g @catppuccin_window_status_style "rounded"
set -g status-position top
set -g status-right-length 100
set -ogq @catppuccin_status_connect_separator "no"
set -g status-left-length 100
set -g status-left "#{E:@catppuccin_status_application} "
set -ogq @catppuccin_status_right_separator "\ue0b4"
set -g status-right "#{E:@catppuccin_status_session} "
set -ag status-right "#{E:@catppuccin_status_uptime}"A set of options that make tmux more pleasant to use.
set -g @plugin 'tmux-plugins/tmux-sensible'Save and restore tmux environment.
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'Add the tpm plugin manager to the config.
set -g @plugin 'tmux-plugins/tpm'
run '~/.tmux/plugins/tpm/tpm'