1
0
Fork 0
mirror of https://github.com/kastdeur/dotfiles.git synced 2024-12-22 01:03:35 +01:00

Restructured Tmux main config

This commit is contained in:
Eric Teunis de Boone 2020-03-07 01:52:27 +01:00
parent 5fb588478a
commit 5af55e6014

View file

@ -1,41 +1,65 @@
# use ^b as prefix
set -g prefix C-b
#
# ~/.tmux.conf
#
# force a reload of the config file
# use ^b as prefix
set-option -g prefix C-b
# bind : to command-prompt like vim
# this is default
bind : command-prompt
# use r to force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf\; display "Reloaded!"
# start window numbering at 1 for easier switching
set -g base-index 1
# start window numbering at 1
set-option -g base-index 1
# vim shortcuts
setw -g mode-keys vi
set -g status-keys vi
# vi-style controls for copy mode
set-window-option -g mode-keys vi
# Make copy mode more vim-like.
#bind -t vi-copy v begin-selection
#bind -t vi-copy y copy-selection
#bind -t vi-copy C-v rectangle-toggle
# correct term for 256 colors
set-option -g default-terminal "xterm-256color"
# enable true color in term
set-option -ga terminal-overrides ",xterm-256color:Tc"
# commands
bind : command-prompt
# remove escape key delay
set-option -g escape-time 0
# colors
set -g default-terminal "screen-256color"
# Set titling
# dynamic window title
set-option -g set-titles on
set-window-option -g automatic-rename on
setw -g monitor-activity on
# use PREFIX | to split window horizontally and PREFIX - to split vertically
# highlight window when it has new activity
set-window-option -g monitor-activity on
# use | to split window horizontally and - to split vertically
bind | split-window -h
bind - split-window -v
# status bar config
set -g status-left "#h"
set -g status-left-length 70
set -g status-right "%a %d-%m-%y :: %H:%M"
# use vim's definition splitting (reverse of tmux)
bind s split-window -v
bind v split-window -h
# disable mouse
set-window-option -g mode-mouse off
# default status bar colours
set-option -g status-bg black
set-option -g status-fg white
set-window-option -g window-status-bell-style bg=black,fg=brightred
set-window-option -g windows-status-current-style fg=brightyellow
# default status bar content
set-option -g status-left "#h"
set-option -g status-left-length 70
set-option -g status-right "%a %d-%m-%y :: %H:%M"
# enable UTF-8 support
set-option -g status-utf8 on
# Try loading machine specific things
run-shell "bash ~/.tmux/load_hostnames.sh"