tmux/tmux.conf
2025-08-19 14:57:48 -07:00

64 lines
2.2 KiB
Bash

set -g @plugin "tmux-plugins/tpm" # tmux plugin manager
set -g @plugin "tmux-plugins/tmux-sensible" # sensible defaults for tmux
set -g @plugin "tmux-plugins/tmux-resurrect" # save/restore tmux sessions
set -g @plugin "tmux-plugins/tmux-continuum" # autosave tmux sessions
# tmux-resurrect
set -g @resurrect-strategy-nvim "session" # save nvim sessions
set -g @resurrect-capture-pane-contents "on" # capture tmux panes
set -g @continuum-restore "on" # automatically restore tmux session on server start
run '~/.tmux/plugins/tpm/tpm'
# set terminal colors to 24-bit
set-option -sa terminal-overrides ",xterm*:Tc"
# use zsh
set-option -g default-shell /bin/zsh
# enable mouse mode
set -g mouse on
# vi keys for navigation
set-window-option -g mode-keys vi
# copy mode and clipboard
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
bind-key v copy-mode
set -g set-clipboard on
set -as terminal-feature ",*:clipboard"
set -s copy-command "xsel -i -b"
# vim style pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind M-h resize-pane -L 10
bind M-j resize-pane -D 10
bind M-k resize-pane -U 10
bind M-l resize-pane -R 10
# open new panes/windows in current path
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Make the status line pretty and add some modules
set -g status-right-length 100
set -g status-left-length 100
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_application}"
set -ag status-right "#{E:@catppuccin_status_session}"
# setw -g window-status-format "##{b:pane_current_path}"
# catppuccin
# Configure the catppuccin plugin
# set -g @catppuccin_flavor "mocha"
set -g @catppuccin_flavor "frappe"
set -g @catppuccin_window_status_style "basic"
set -g @catppuccin_pane_number_position "right"
set -g @catppuccin_window_text "#{b:pane_current_path}"
set -g @catppuccin_window_current_text "#{b:pane_current_path}"
set -g @catppuccin_pane_default_text "pane"
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux