tmux/tmux.conf

99 lines
3.1 KiB
Plaintext

set -sg escape-time 200
set -g activity-action other
set -g assume-paste-time 1
set -g base-index 1
set -g bell-action any
set -g default-command ""
set -g default-shell "/bin/zsh"
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-time 1000
set -g display-time 3000
set -g history-limit 2000
set -g key-table "root"
set -g lock-after-time 0
set -g lock-command "lock -np"
set -g mouse off
set -g prefix C-b
set -g prefix2 None
set -g renumber-windows off
set -g repeat-time 500
set -g set-titles on
set -g set-titles-string "#S:#I:#W - \"#T\" #{session_alerts}"
set -g silence-action other
set -g status on
set -g status-position bottom
set -g status-interval 5
set -g status-justify left
set -g status-keys vi
set -g status-left-length 25
set -g status-right-length 45
set -g status-right-style default
set -g window-status-separator ""
set -g mode-keys vi
set -ga update-environment[0] "DISPLAY"
set -ga update-environment[1] "SSH_ASKPASS"
set -ga update-environment[2] "SSH_AUTH_SOCK"
set -ga update-environment[3] "SSH_AGENT_PID"
set -ga update-environment[4] "SSH_CONNECTION"
set -ga update-environment[5] "WINDOWID"
set -ga update-environment[6] "XAUTHORITY"
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
set -g word-separators " -_@"
# enable true color support
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# set-option -g default-shell "/usr/bin/fish"
set-option -g default-shell "/usr/bin/zsh"
# hide status bar for single windows
# https://www.reddit.com/r/tmux/comments/6lwb07/is_it_possible_to_hide_the_status_bar_in_only_a/dpzr5d7
# if -F "#{==:#{session_windows},1}" "set status off" "set status on"
# set-hook -g window-linked 'if -F "#{==:#{session_windows},1}" "set status off" "set status on"'
# set-hook -g window-unlinked 'if -F "#{==:#{session_windows},1}" "set status off" "set status on"'
# Control + F1 toggles status
bind-key -n C-F1 set-option status
# open splits/windows in current directory
# https://coderwall.com/p/jpsa7q/tmux-windows-and-pane-split-s-on-current-directory
bind-key c new-window -c "#{pane_current_path}"
bind-key % split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -v -c "#{pane_current_path}"
# load colour configuration from colours file
source-file ~/.config/tmux/tmux.colours.conf
# Tmux Plugin Manager
# https://github.com/tmux-plugins/tpm
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @resurrect-capture-pane-contents 'on'
# set -g @resurrect-strategy-vim 'session'
# set -g @resurrect-strategy-nvim 'session'
# set -g @resurrect-save-shell-history 'off'
# set -g @continuum-restore 'on'
# set -g @continuum-save-interval '10'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'