dots/.config/tmux/tmux.conf

74 lines
2.7 KiB
Plaintext

#########################
### TMUX CLI COMMANDS ###
#########################
# Reload tmux configuration tmux source ~/.config/tmux/tmux.conf
# Attach to an existing session tmux attach -t session_name
# Kill all tmux processes pkill -f tmux
# Install specified plugins via TPM prefix + I
# Run custom shell script at startup run-shell "~/your/command.sh"
# (in tmux.conf)
########################
### GENERAL SETTINGS ###
########################
set -g base-index 1 # Start window numbering at 1
set -g pane-base-index 1 # Start pane numbering at 1
set -g aggressive-resize on # Automatically resize panes on window size change
set -g history-limit 10000 # Keep 10,000 lines in scrollback buffer
set -g set-titles on # Enable automatic title updates
set -g mouse on # Enable mouse support
set -g mode-style "fg=black,bg=blue" # Customize text selection colors in copy mode
set -g status-position top # Place status bar at top
set-environment -g LC_CTYPE "ru_RU.UTF-8" # Set environment encoding for Russian
#set -g pane-active-border-style fg=blue # Set active board color: example with bg 'fg=blue,bg=green'
#set -s set-clipboard off # Clipboard mode on|off|external
#set -g display-time 100 # Set deley after changing focus of pane (def 750 ms)
## Extra status bar line
#setw -g pane-border-status bottom # Border placement
#setw -g pane-border-format '─' # Border style
####################
### PLUGINS LIST ###
####################
# Plugins
set -g @plugin 'tmux-plugins/tpm' # Plugins manager
set -g @plugin 'tmux-plugins/tmux-sensible' # Optimal tmux default settings
set -g @plugin 'arcticicestudio/nord-tmux' # Nord theme for tmux
set -g @plugin 'tmux-plugins/tmux-continuum' # Automates save and restore actions of tmux-resurrect
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
######################
### PLUGINS CONFIG ###
######################
# Configure tmux-continuum
set -g @continuum-boot 'on' # Auto-start tmux via systemd
set -g @continuum-restore 'on' # Auto-restore tmux sessions
set -g @continuum-save-interval '60' # Auto-save every 60 minutes
# Ensure TPM plugin is installed
if "test ! -d ~/.config/tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm'"
# Autoinstall other plugins on new machine
run '~/.config/tmux/plugins/tpm/tpm'
run '~/.config/tmux/plugins/tpm/bin/install_plugins'
# Initialize TPM (keep this line at very bottom of tmux.conf)
run '~/.config/tmux/plugins/tpm/tpm'