2024-02-03 12:36:54 -08:00
|
|
|
################################################################################
|
|
|
|
# Plugins #
|
|
|
|
################################################################################
|
|
|
|
|
2024-01-28 11:55:11 -08:00
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
|
|
set -g @plugin 'catppuccin/tmux'
|
2024-01-28 19:07:02 -08:00
|
|
|
|
2024-02-03 12:36:54 -08:00
|
|
|
################################################################################
|
|
|
|
# General #
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# Make window index start at 1.
|
|
|
|
set -g base-index 1
|
|
|
|
|
|
|
|
# Make pane index start at 1.
|
|
|
|
setw -g pane-base-index 1
|
|
|
|
|
|
|
|
set -g default-terminal "screen-256color"
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Key Mappings #
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# Remap prefix.
|
|
|
|
unbind C-b
|
|
|
|
set-option -g prefix C-a
|
|
|
|
bind C-a send-prefix
|
|
|
|
|
|
|
|
# Vi copy mode.
|
|
|
|
setw -g mode-keys vi
|
|
|
|
unbind [
|
|
|
|
bind Escape copy-mode
|
|
|
|
unbind p
|
|
|
|
bind p paste-buffer
|
|
|
|
bind -T copy-mode-vi 'v' send -X begin-selection
|
|
|
|
bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel
|
|
|
|
|
|
|
|
# Better split commands.
|
|
|
|
bind | split-window -h -c "#{pane_current_path}" # cmd-| in iTerm2
|
|
|
|
bind - split-window -v -c "#{pane_current_path}" # cmd-- in iTerm2
|
|
|
|
unbind '"'
|
|
|
|
unbind %
|
|
|
|
|
|
|
|
# Vi-like resizing.
|
|
|
|
bind j resize-pane -D # cmd-j in iTerm2
|
|
|
|
bind k resize-pane -U # cmd-k in iTerm2
|
|
|
|
bind h resize-pane -L # cmd-h in iTerm2
|
|
|
|
bind l resize-pane -R # cmd-l in iTerm2
|
|
|
|
|
|
|
|
# Easy reload config.
|
|
|
|
bind r source-file ~/.tmux.conf
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Catppuccin #
|
|
|
|
################################################################################
|
2024-01-28 19:07:02 -08:00
|
|
|
|
2024-01-28 14:59:27 -08:00
|
|
|
# catppuccin
|
2024-01-28 11:55:11 -08:00
|
|
|
set -g @catppuccin_flavour 'mocha'
|
|
|
|
|
2024-01-28 19:32:30 -08:00
|
|
|
set -g @catppuccin_window_left_separator " "
|
|
|
|
set -g @catppuccin_window_right_separator ""
|
|
|
|
set -g @catppuccin_window_middle_separator "█ "
|
|
|
|
set -g @catppuccin_window_number_position "left"
|
2024-01-28 11:55:11 -08:00
|
|
|
|
|
|
|
set -g @catppuccin_window_default_fill "number"
|
|
|
|
set -g @catppuccin_window_default_text "#W"
|
|
|
|
|
|
|
|
set -g @catppuccin_window_current_fill "number"
|
|
|
|
set -g @catppuccin_window_current_text "#W"
|
|
|
|
|
2024-01-28 19:32:30 -08:00
|
|
|
set -g @catppuccin_status_modules_left "directory"
|
|
|
|
set -g @catppuccin_status_modules_right "user host session date_time"
|
2024-01-28 11:55:11 -08:00
|
|
|
set -g @catppuccin_status_left_separator " "
|
|
|
|
set -g @catppuccin_status_right_separator ""
|
|
|
|
set -g @catppuccin_status_right_separator_inverse "no"
|
|
|
|
set -g @catppuccin_status_fill "icon"
|
|
|
|
set -g @catppuccin_status_connect_separator "no"
|
|
|
|
|
|
|
|
set -g @catppuccin_directory_text "#{pane_current_path}"
|
2024-01-28 19:32:30 -08:00
|
|
|
set -g @catppuccin_date_time_text "%b %d • %I:%M %p"
|
2024-01-28 11:55:11 -08:00
|
|
|
|
2024-02-03 12:36:54 -08:00
|
|
|
################################################################################
|
|
|
|
# tpm #
|
|
|
|
################################################################################
|
2024-01-28 14:59:27 -08:00
|
|
|
|
2024-01-28 11:55:11 -08:00
|
|
|
# Install tpm if not already installed.
|
|
|
|
if "test ! -d ~/.tmux/plugins/tpm" \
|
|
|
|
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
|
|
|
|
|
|
|
|
# Init tmux plugin manager.
|
|
|
|
# Must be very last line!!
|
|
|
|
run '~/.tmux/plugins/tpm/tpm'
|