Files
dotfiles/.config/tmux/tmux.conf
Christopher Beckmann 4f35a25c10 umstrukturiert
2023-05-26 17:00:58 +02:00

63 lines
1.6 KiB
Bash

# default shell
set-option -g default-shell /bin/zsh
set-option -g status-position bottom
# tmux theme
source-file "${XDG_CONFIG_HOME}/tmux/tmux.theme"
# 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 | and -
unbind '"'
unbind %
bind | split-window -h -c "#{pane_current_path}" # -c openes it in the current directory
bind - split-window -v -c "#{pane_current_path}"
# History limit increase
set -g history-limit 50000
# reload config
bind C-r source-file ${XDG_CONFIG_HOME}/tmux/tmux.conf \; display "Config reloaded!"
# 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
# vim style switch pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# Timeout for display messages (in milliseconds)
set -g display-time 1000
# Plugins
set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
bind -T copy-mode C-c send -X copy-pipe-no-clear "xclip -sel clip"
bind -T copy-mode-vi C-c send -X copy-pipe-no-clear "xclip -sel clip"
# Fix numbering for easy switching
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
## init tpm
run ${XDG_CONFIG_HOME}/tmux/plugins/tpm/tpm