mirror of
https://github.com/vbrandl/dotfiles
synced 2024-11-23 00:13:49 +01:00
Add tmux configuration
This commit is contained in:
parent
c188d25571
commit
d1cf44d70a
5
terminals/tmux/README.md
Normal file
5
terminals/tmux/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# TMUX
|
||||||
|
|
||||||
|
## Italics and Truecolor
|
||||||
|
For italics and truecolor to work inside tmux, a custom TERMINFO is needed. To compile the terminfo file run the following:
|
||||||
|
`tic xterm-256color-italic.terminfo`
|
14
terminals/tmux/tmux-256color-italic.terminfo
Normal file
14
terminals/tmux/tmux-256color-italic.terminfo
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
|
||||||
|
#
|
||||||
|
# Install:
|
||||||
|
#
|
||||||
|
# tic xterm-256color-italic.terminfo
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# export TERM=xterm-256color-italic
|
||||||
|
#
|
||||||
|
tmux-256color-italic|tmux with 256 colors and italic,
|
||||||
|
sitm=\E[3m, ritm=\E[23m,
|
||||||
|
use=screen-256color,
|
||||||
|
# vim: set filetype=conf ts=4 sw=8 tw=120 et :
|
83
terminals/tmux/tmux.conf
Normal file
83
terminals/tmux/tmux.conf
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
# ~/.tmux.conf
|
||||||
|
#
|
||||||
|
# alias: tmux=tmux -2u
|
||||||
|
# use C-a, since it's on the home row and easier to hit than C-b
|
||||||
|
set-option -g prefix C-a
|
||||||
|
unbind-key C-a
|
||||||
|
bind-key C-a send-prefix
|
||||||
|
bind a last-window
|
||||||
|
|
||||||
|
setw -g mode-keys vi
|
||||||
|
|
||||||
|
# highlight window when it has new activity
|
||||||
|
setw -g monitor-activity on
|
||||||
|
set -g visual-activity on
|
||||||
|
|
||||||
|
# renumber windows when one is closed
|
||||||
|
set -g renumber-windows on
|
||||||
|
|
||||||
|
# Easy config reload
|
||||||
|
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
|
||||||
|
|
||||||
|
# mouse behavior
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
# Fix to allow mousewheel/trackpad scrolling in tmux 2.1
|
||||||
|
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
|
||||||
|
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
|
||||||
|
|
||||||
|
# increase scroll-back history
|
||||||
|
set -g history-limit 50000
|
||||||
|
|
||||||
|
# show tmux messages for 4 seconds
|
||||||
|
set -g display-time 4000
|
||||||
|
|
||||||
|
# New Pane
|
||||||
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# New Session
|
||||||
|
bind enter new
|
||||||
|
|
||||||
|
# Split Panes
|
||||||
|
bind h split-window -h -c '#{pane_current_path}' # Split panes horizontal
|
||||||
|
bind v split-window -v -c '#{pane_current_path}' # Split panes vertically
|
||||||
|
|
||||||
|
# focus events enabled for terminals that support them
|
||||||
|
set -g focus-events on
|
||||||
|
|
||||||
|
# super useful when using "grouped sessions" and multi-monitor setup
|
||||||
|
setw -g aggressive-resize on
|
||||||
|
|
||||||
|
# default statusbar colors
|
||||||
|
set -g status-fg white
|
||||||
|
set -g status-bg default
|
||||||
|
|
||||||
|
# default window title colors
|
||||||
|
set-window-option -g window-status-fg black
|
||||||
|
set-window-option -g window-status-bg default
|
||||||
|
set-window-option -g window-status-attr dim
|
||||||
|
|
||||||
|
# active window title colors
|
||||||
|
set-window-option -g window-status-current-fg white
|
||||||
|
set-window-option -g window-status-current-bg default
|
||||||
|
set-window-option -g window-status-current-attr dim
|
||||||
|
|
||||||
|
# command/message line colors
|
||||||
|
set -g message-fg white
|
||||||
|
set -g message-bg black
|
||||||
|
set -g message-attr bright
|
||||||
|
|
||||||
|
# address vim mode switching delay (http://superuser.com/a/252717/65504)
|
||||||
|
set -s escape-time 0
|
||||||
|
|
||||||
|
# set -g default-terminal "screen-256color"
|
||||||
|
set -g default-terminal "tmux-256color-italic"
|
||||||
|
set-option -ga terminal-overrides ",xterm-termite:Tc"
|
||||||
|
|
||||||
|
set -g set-titles on
|
||||||
|
set -g set-titles-string "[#S] $USER@#H:#{pane_current_path} #{pane_current_command}"
|
||||||
|
|
||||||
|
set-window-option -g xterm-keys on
|
||||||
|
|
||||||
|
bind y run-shell "tmux show-buffer | xclip -sel clip -i" \; display-message "Copied tmux buffer to system clipboard"
|
||||||
|
# vim: set filetype=conf ts=4 sw=4 tw=120 noet :
|
Loading…
Reference in New Issue
Block a user