Files
absolute-dotfiles/.tmux.conf
David Ibia e4ddf72417 feat(.tmux.conf): add custom tmux configuration file
This commit adds a new file `.tmux.conf` which contains custom configuration settings for tmux. The changes include:

- Enable mouse support in tmux
- Add key binding to reload the tmux configuration file
- Set terminal features to support xterm-kitty:RGB
- Set escape time to 10 milliseconds
- Enable focus events in tmux
- Set mode keys to vi style
- Configure key bindings for tmux copy mode
- Configure key bindings for vertical and horizontal splits
- Configure key bindings for pane resizing
- Configure key binding for pane minimize/maximize
- Add a list of plugins for tmux
- Set plugin-specific configurations for tmux-resurrect, tmux-continuum, and dracula/tmux
- Set status bar position to top
- Initialize TMUX plugin manager

These changes are made to enhance the functionality and customization options of tmux.
2024-01-15 16:25:56 +01:00

63 lines
1.5 KiB
Bash

set -g mouse on
bind r source-file ~/.tmux.conf
set-option -sa terminal-features ',xterm-kitty:RGB'
set-option -sg escape-time 10
set-option -g focus-events on
set-window-option -g mode-keys vi
# Key Bindings
# Auto Source tmux.conf
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Setting up vi binds for tmux copy mode
bind-key -T copy-mode-vi "v" send-keys -X begin-selection
bind-key -T copy-mode-vi "y" send-keys -X copy-selection
unbind -T copy-mode-vi MouseDragEnd1Pane
# Setting up vertical split with |
unbind %
bind | split-window -h
# Setting up horizontal split with -
unbind '"'
bind - split-window -v
# Setting up pane resize with hjkl
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
bind -r h resize-pane -L 5
# Setting up pane minimize/maximize with m
bind -r m resize-pane -Z
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-dir "~/.tmux/resurrect"
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
set -g @plugin "dracula/tmux"
set -g @dracula-show-powerline true
set -g @dracula-plugins "weather"
set -g @dracula-show-flags true
set -g @dracula-show-left-icon session
set -g status-position top
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'