Add tmux.conf

Added a complete basic tmux.conf.
This commit is contained in:
c47 2024-01-13 19:18:38 +01:00
parent a5c7dc600b
commit 6670ff0329
2 changed files with 55 additions and 0 deletions

View file

@ -22,3 +22,8 @@ done
if [[ ! -L ${CONFIG_DIR}/nvim ]]; then
ln -s ${WORKING_DIR}/nvim/ ${CONFIG_DIR}/nvim 2>/dev/null
fi
if [[ ! -L ${HOME}/.tmux.conf ]]; then
ln -s ${WORKING_DIR}/tmux/tmux.conf .tmux.conf 2>/dev/null
fi

50
tmux/tmux.conf Normal file
View file

@ -0,0 +1,50 @@
#
# General stuff
set -g prefix C-a
set -g base-index 1
set -s escape-time 1
set -g default-terminal "tmux"
set -g status-interval 120
setw -g mode-keys vi
bind r source ~/.tmux.conf \; display "tmux.conf reloaded"
bind -r < resize-pane -L 3
bind -r > resize-pane -R 3
bind -r + resize-pane -D 3
bind -r = resize-pane -U 3
#
# vim-like movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind C new-window -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Use F12 to switch between inner and outer session in
# in case of nested sessions to contol where to send
# tmux commands.
bind -T root F12 \
set prefix None \;\
set key-table off \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off F12 \
set -u prefix \;\
set -u key-table \;\
refresh-client -S
#
# Status bar settings
set -g status-position bottom
set -g status-justify centre
set -g status-style 'bg=black fg=yellow'
set -g status-left-length 50
set -g status-right ' %Y-%m-%d .:. %H:%M '