2024-03-22 23:44:33 +03:00

81 lines
2.5 KiB
Bash

set -g prefix C-b
set -s exit-empty off
set -s exit-unattached off
# pane navigation
bind | split-window -h -c "#{pane_current_path}"
bind \\ split-window -v -c "#{pane_current_path}"
bind -n M-Enter split-window -h -c "#{pane_current_path}"
bind -n M-t new-window
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n C-M-h next-window
bind -n C-M-l previous-window
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
bind -n M-0 select-window -t 10
set-option -ga terminal-overrides ",xterm-256color:Tc"
set -g status-justify centre
set -g status-left-length 40
set -g status-left "[#S@#H]"
set -g status-right '%d.%m.%Y %H:%M'
set -g status-style 'bg=default,fg=white'
set -g window-status-style 'bg=default'
set -g window-status-current-style 'bg=white,fg=black bold'
set -g message-style 'fg=black bg=white bold'
set-option -g bell-action none
set -g mouse on
set-option -g repeat-time 0
set -ga update-environment 'DISPLAY' # Maybe fix DISPLAY?
set -g base-index 1 ## Window numbering starts at 1
set -g pane-base-index 1 ## Pane numbering starts at 1
setw -g automatic-rename on ## Auto set window title
setw -g aggressive-resize on ## Aggressive windows: For screen size, of diff connections, on diff windows
set -g default-terminal "tmux-256color"
set -g history-limit 10000 ## Scroll back history
set -g display-panes-time 4000 ## Increase show pane time
set -g renumber-windows on ## Make windows auto renumber
set -g lock-command vlock
bind C-r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded..."
## Lock screen
bind-key -T prefix C-x confirm-before -p "lock tmux? (y/n)" lock-session
bind-key C-v copy-mod
setw -g mode-keys vi
bind p paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi c send-keys -X clear-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi V send-keys -X rectangle-toggle
set -g set-titles on
set -g set-titles-string '#S:#I.#P #W'
setw -g clock-mode-colour green
setw -g clock-mode-style 24
bind 1 source-file ~/.tmux/01.conf
bind 2 source-file ~/.tmux/02.conf
bind 3 source-file ~/.tmux/03.conf
bind 4 source-file ~/.tmux/04.conf
bind 5 source-file ~/.tmux/05.conf