myhome/.tmux.conf

66 lines
2.9 KiB
Bash

# Default shell configuration
set-option -g default-shell /bin/zsh
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
# Keybindings
unbind C-b # Unbind a default keys conbination
unbind q # Unbind a q key
set -g prefix C-a # Set a default keys conbination
bind-key C-a send-prefix # Set a default keys conbination
bind q confirm kill-window # Set a kill-window keybind
bind Q confirm kill-pane # Set a kill-pane keybind
bind - split-window -v # Split window vertical
bind _ split-window -h # Split window horizontal
bind > swap-pane -D # Swap current pane with the next one
bind < swap-pane -U # Swap current pane with the previous one
bind C-w select-pane -l # Go to last panel
bind h select-pane -L # Go to left panel
bind j select-pane -D # Go to down panel
bind k select-pane -U # Go to up panel
bind l select-pane -R # Go to right panel
bind -r H resize-pane -L 2 # Resize panel left
bind -r J resize-pane -D 2 # Resize panel down
bind -r K resize-pane -U 2 # Resize panel up
bind -r L resize-pane -R 2 # Resize panel right
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
bind C-c new-session # Keybind for a new session
bind C-f command-prompt -p find-session 'switch-client -t %%'
bind-key -n C-f copy-mode \; send-key ?
# Copying a output from panel the terminal to file ~/tmux.history
bind-key p command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -JS -32768 ; save-buffer %1 ; delete-buffer'
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
set -g visual-bell off
# Coloring of the panel
set -g pane-border-style fg=default
set -g pane-active-border-style "bg=default fg=color244"
# Status bar
## 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"