65 lines
1.8 KiB
Bash
65 lines
1.8 KiB
Bash
#
|
|
# keybindings
|
|
#
|
|
|
|
# remap prefix from 'C-b' to 'C-a'
|
|
unbind C-b
|
|
set-option -g prefix C-a
|
|
bind-key C-a send-prefix
|
|
|
|
# vim keys
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
|
|
bind r source-file ~/.config/tmux/tmux.conf
|
|
|
|
# start ajacent terminals with same path
|
|
bind c new-window -c "#{pane_current_path}"
|
|
bind '"' split-window -c "#{pane_current_path}"
|
|
bind % split-window -h -c "#{pane_current_path}"
|
|
|
|
#
|
|
# options
|
|
#
|
|
|
|
# set variables
|
|
set -g mouse on
|
|
set -g history-limit 100000
|
|
|
|
# start panes and windows at index 1 instead of 0
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
set-option -g renumber-windows on # if win 2 get deleted, win 3 gets renamed to win 2
|
|
|
|
set -g visual-activity off
|
|
set -g set-clipboard on
|
|
set -g focus-events on # lets programs know if they loose focus
|
|
set -g status-keys emacs # emacs bindings in tmux prompt ( prefix + :)
|
|
set -g default-terminal "screen-256color" # upgrade TERM variable to have more colours
|
|
set -g display-time 4000 # display tmux messages for 4s
|
|
|
|
#
|
|
# status bar
|
|
#
|
|
|
|
set -g status-style "bg=default"
|
|
set -g status-fg "white"
|
|
set -g status-left "#[bg=purple,fg=black]#{?client_prefix,#[reverse]#[bg=yellow]#[noreverse]} #S "
|
|
set -g status-right "%d/%m #[bg=purple,fg=black] #H "
|
|
|
|
# max allowed lenth for statuses to flow into
|
|
set -g status-left-length 20
|
|
set -g status-right-length 20
|
|
|
|
# tab bar
|
|
set -g window-status-format " #I #W "
|
|
set -g window-status-current-format " #I #W "
|
|
set -g window-status-current-style bg=black,fg=blue,bold
|
|
|
|
# fix undercurls: https://github.com/folke/tokyonight.nvim#fix-undercurls-in-tmux
|
|
set -g default-terminal "${TERM}"
|
|
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
|
|
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
|
|
set -gq allow-passthrough on
|