mirror of
https://github.com/kastdeur/dotfiles.git
synced 2024-12-22 09:13:33 +01:00
Restructured Tmux main config
This commit is contained in:
parent
5fb588478a
commit
5af55e6014
1 changed files with 48 additions and 24 deletions
|
@ -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
|
unbind r
|
||||||
bind r source-file ~/.tmux.conf\; display "Reloaded!"
|
bind r source-file ~/.tmux.conf\; display "Reloaded!"
|
||||||
|
|
||||||
# start window numbering at 1 for easier switching
|
# start window numbering at 1
|
||||||
set -g base-index 1
|
set-option -g base-index 1
|
||||||
|
|
||||||
# vim shortcuts
|
# vi-style controls for copy mode
|
||||||
setw -g mode-keys vi
|
set-window-option -g mode-keys vi
|
||||||
set -g status-keys vi
|
|
||||||
|
|
||||||
# Make copy mode more vim-like.
|
# correct term for 256 colors
|
||||||
#bind -t vi-copy v begin-selection
|
set-option -g default-terminal "xterm-256color"
|
||||||
#bind -t vi-copy y copy-selection
|
# enable true color in term
|
||||||
#bind -t vi-copy C-v rectangle-toggle
|
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
||||||
|
|
||||||
# commands
|
# remove escape key delay
|
||||||
bind : command-prompt
|
set-option -g escape-time 0
|
||||||
|
|
||||||
# colors
|
# dynamic window title
|
||||||
set -g default-terminal "screen-256color"
|
|
||||||
|
|
||||||
# Set titling
|
|
||||||
set-option -g set-titles on
|
set-option -g set-titles on
|
||||||
set-window-option -g automatic-rename 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 -h
|
||||||
bind - split-window -v
|
bind - split-window -v
|
||||||
|
|
||||||
# status bar config
|
# use vim's definition splitting (reverse of tmux)
|
||||||
set -g status-left "#h"
|
bind s split-window -v
|
||||||
set -g status-left-length 70
|
bind v split-window -h
|
||||||
set -g status-right "%a %d-%m-%y :: %H:%M"
|
|
||||||
|
# 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
|
# Try loading machine specific things
|
||||||
run-shell "bash ~/.tmux/load_hostnames.sh"
|
run-shell "bash ~/.tmux/load_hostnames.sh"
|
||||||
|
|
Loading…
Reference in a new issue