Files
dotfiles/config/tmux/.tmux.conf
T

64 lines
1.7 KiB
Bash

# Terminal colors
set -g default-terminal "tmux-256color"
set -as terminal-features ",xterm*:RGB"
set -g mouse on
set -g base-index 1
set -g pane-base-index 1
set -s escape-time 10
# remap prefix from 'C-b' to 'C-f'
unbind l
unbind C-b
set-option -g prefix C-f
bind-key C-f send-prefix
# reload config file
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
setw -g mode-keys vi
bind -n C-h select-pane -L
bind -n C-l select-pane -R
bind -n C-k select-pane -U
bind -n C-j select-pane -D
bind h select-pane -L
bind l select-pane -R
bind k select-pane -U
bind j select-pane -D
bind f resize-pane -Z
# Select windows with alt+num
bind-key -n M-1 selectw -t 1
bind-key -n M-2 selectw -t 2
bind-key -n M-3 selectw -t 3
bind-key -n M-4 selectw -t 3
bind-key -n M-5 selectw -t 3
bind m command-prompt "new-session -s %1"
# split panes using | and -
unbind '"'
unbind %
bind '`' split-window -h -l 40% -c "#{pane_current_path}"
bind '\' split-window -v -l 35% -c "#{pane_current_path}"
bind-key -n 'C-\' run-shell -b "~/.local/bin/tmux-toggle-term float"
bind g run-shell 'tmux popup -d "#{pane_current_path}" -xC -yC -w90% -h90% -E gitu'
bind e run-shell 'tmux popup -d "#{pane_current_path}" -xC -yC -w90% -h90% -E "~/.local/bin/tmux-lf-helix"'
## STATUS BAR ##################################################################
## Status bar design
set -g status-justify centre
set -g status-position top
set -g status-bg '#181616'
set -g status-fg '#c5c9c5'
## Show PREFIX on right side when c-b
set -g status-left '#[fg=colour232,bg="#af875f",bold]#{?client_prefix, <PK> ,}#[fg="#1c1c1c",bg="#767676",bold][#S] '
set -g status-left-length 20
set -g status-right ''