myhome/.tmux.conf

55 lines
2.2 KiB
Bash

set -g prefix C-a
set-option -g default-shell /bin/zsh
bind-key p command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -JS -32768 ; save-buffer %1 ; delete-buffer'
unbind C-b
bind-key C-a send-prefix
unbind q
bind q confirm kill-window
bind Q confirm kill-pane
set -g status on
bind-key -n C-f copy-mode \; send-key ?
set -g default-terminal "st-256color"
set -g history-limit 20000
set-option -sg escape-time 0
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 1000 # slightly longer status messages display time
set -g status-interval 10 # redraw status line every 10 seconds
set -g monitor-activity on
set -g visual-activity off
bind C-c new-session
bind C-f command-prompt -p find-session 'switch-client -t %%'
bind - split-window -v
bind _ split-window -h
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
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 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 3
bind -r L resize-pane -R 2
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
# Source of example configuration
# https://arcolinux.com/everything-you-need-to-know-about-tmux-status-bar/
set-option -g status on
set-option -g status-interval 1
set-option -g status-position bottom
set-option -g status-style fg=white,bg=black
set-option -g status-left-length 20
set-option -g status-left-style default
set-option -g status-right-length 140
set-option -g status-right-style default
set-option -g status-right "%a %H:%M:%S %Y-%m-%d"
set -g pane-border-style fg=default
set -g pane-active-border-style "bg=default fg=color244"