dotfiles/tmux/tmux.conf
2025-04-08 15:39:00 +02:00

94 lines
2.3 KiB
Bash

# Set color scheme
# template dove al post delle XXX metto il terminale che lancia tmux
# set-option -a terminal-features 'XXX:RGB'
set-option -a terminal-features 'kgx:RGB'
set-option -g default-shell /bin/zsh
# Pane splitting
unbind %
bind | split-window -h -c "#{pane_current_path}"
unbind '"'
bind - split-window -v -c "#{pane_current_path}"
# Pane creation
bind c new-window -c "#{pane_current_path}"
# Reload config
unbind r
bind r source-file ~/.config/tmux/tmux.conf \; display "Config reloaded..."
# Options
# Enable mouse support
set -g mouse on
# Increase scrollback buffer size
set -g history-limit 1000000
# Start window and pane numbering at 1
set -g base-index 1
set -g pane-base-index 1
set -g detach-on-destroy off # don't exit from tmux when closing a session
# Detach sessions instead of killing them
set -g detach-on-destroy on
# Renumber windows automatically after one is closed
set -g renumber-windows on
# Use system clipboard
set -g set-clipboard on
# navigation
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
bind -n M-0 select-window -t 10
# Navigation between panes using arrow keys with the prefix key
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
# Rename session
unbind n
bind n command-prompt -p "Name of session: " "rename-session '%%'"
# Keybinding to kill pane
bind x kill-pane
# Set color scheme for status bar
set-option -g status-bg "#282828"
set-option -g status-fg "#fe8019"
set-option -g status-interval 5
set-option -g status-left-length 40
set-option -g status-right-length 40
# Customize status bar content
set -g status-left "#[fg=#d3869b]S: #S #[fg=#d3869b]• #[fg=#d3869b]W: #I #[fg=#d3869b]• "
set -g status-right "#[fg=#d3869b]%H:%M %d-%b-%y"
# package manager
unbind I
bind I run '~/.config/tmux/plugins/tpm/tpm'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
#
# set -g @continuum-restore 'on'
run '~/.config/tmux/plugins/tpm/tpm'