You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotfiles/tmux/.tmux.conf

102 lines
2.5 KiB
Plaintext

#Bindings
set -g prefix C-a
unbind C-b
# C-a a should send ctrl-a to the underlying shell (move to start of line)
bind-key a send-prefix
# C-a C-a
bind-key C-a last-window
unbind %
# use "v" and "s" to do vertical/horizontal splits, like vim
bind s split-window -v -c '#{pane_current_path}'
bind v split-window -h -c '#{pane_current_path}'
# use the vim motion keys to move between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# use vim motion keys while in copy mode
setw -g mode-keys vi
# use the vim resize keys.
# the number at the end is how much the pane will be resized,
# and 1 is fairly small -- you might want to tweak this.
bind - resize-pane -D 1
bind + resize-pane -U 1
bind < resize-pane -L 1
bind > resize-pane -R 1
#Turn broadcasting on/off
bind b set-window-option synchronize-panes
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
set -g status-right '#[fg=yellow]#(uptime | sed -e "s/load average/load/g\;s/ / /g")' # | cut -d "," -f 2-)'
set -g status-right-length 50
# Highlight active window
set-window-option -g window-status-current-bg red
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# Automatically set window title
set -g automatic-rename off
# Mouse and panes
setw -g mode-mouse on
set-option -g mouse-select-pane on
set-option -g mouse-resize-pane on
# resize only if actively looking
setw -g aggressive-resize on
set -g history-limit 100000
#Scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
#set-window-option -g xterm-keys on
##CLIPBOARD selection integration
##Requires prefix key before the command key
#Copy tmux paste buffer to CLIPBOARD
bind C-c run "tmux show-buffer | xclip -i -selection clipboard"
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
bind C-v run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
# set vi keys
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-selection
bind-key -t vi-copy C-v rectangle-toggle
unbind C-s
# copy tmux buffer to clipboard
#bind-key Y save-buffer ~/.tmux/buffer \; run-shell "xsel -i -p <~/.tmux/buffer && rm ~/.tmux/buffer"
#
# Look better
# look good
set -g default-terminal "screen-256color"
# Maximise and minimise panes. TMUX NOW COMES WITH ZOOM: C-a z
unbind m
bind m run "tmux-zoom.sh"
# Fix for emacs and the like
set -s escape-time 0
# Start new-session as default
new-session