Files
dotfiles/.config/tmux/tmux.conf
2024-11-14 19:20:43 -05:00

56 lines
1.6 KiB
Bash

# ----------------------- Options ----------------------- #
# set to use colors
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
# keep current path in new window
bind c new-window -c "#{pane_current_path}"
# use for copying
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind P paste-buffer
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel xclip
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# enable mouse
set -g mouse on
# increase history size
set -g history-limit 50000
# ----------------------- Keybindings ----------------------- #
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using \ (same keys as |) and -
bind '\' split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# swapping windows
bind -r Right next-window
bind -r Left previous-window
# Moving windows
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
# ----------------------- Plugins ----------------------- #
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin "MunifTanjim/tmux-mode-indicator"
# set -g @plugin 'odedlaz/tmux-onedark-theme'
set -g @plugin 'maxigaz/tmux-onedark-theme#pr-no-default-time-date'
set -g @onedark_widgets "#{prefix_highlight}"
run '$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm'