.dotfiles/.config/tmux/tmux.conf

56 lines
1.6 KiB
Plaintext

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'catppuccin/tmux'
# Setting tmux theme
set -g @catppuccin_flavour 'macchiato'
# Change the prefix and unbind the old one
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Start windows and panes at 1 instead of 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Color defaults, helps especially with nvim not having the same colors inside tmux as outside of it
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -g mouse on
set -g set-titles on
setw -g monitor-activity on
# set -g default-shell /home/wynd/.cargo/bin/nu
# Binding for quick reloading
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded TMUX config!"
# Changes the bindings for vertical/horizontal splits and removes the old ones
unbind %
unbind '"'
unbind h
unbind v
bind h split-window -h -c "#{pane_current_path}"
bind v split-window -v -c "#{pane_current_path}"
# switch panes using Alt-arrow without prefix
# bind -n M-Left select-pane -L
# bind -n M-Right select-pane -R
# bind -n M-Up select-pane -U
# bind -n M-Down select-pane -D
# Ctrl + E prompts the renaming command
unbind e
bind e command-prompt -I "#W" "rename-window '%%'"
# Clones TPM if its 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'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.config/tmux/plugins/tpm/tpm'