dotfiles/tmux.conf

55 lines
1.7 KiB
Plaintext
Raw Normal View History

2020-09-19 19:29:59 +00:00
# Re-assigning C-b to C-a
set-option -g prefix C-a
# Bindings for C-a a
bind-key a send-prefix
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green](#S) #(whoami)@#H#[default]'
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=blue]%H:%M#[default]'
set -g status-left-length 30
set -g status-right-length 60
# set correct term
set -g default-terminal screen-256color
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
setw -g aggressive-resize on
# Bindings for vertical + horizontal splits
unbind %
bind | split-window -h
bind - split-window -v
unbind C-o
# Base for numbering is 1, not 0
set -g base-index 1
set -g status-right "#[fg=yellow]#(uptime | cut -d ',' -f 2-)"
# Sending tmux's buffer to X buffer
# This is no longer used, replaced with xclip that works as well for vim
#bind-key > send-keys 'Enter' \; save-buffer /tmp/.tmux-exchange \; run-shell 'xsel -i < /tmp/.tmux-exchange; xsel -i -b < /tmp/.tmux-exchange'
## From: https://wiki.archlinux.org/index.php/Tmux#ICCCM_Selection_Integration
##CLIPBOARD selection integration
###Requires prefix key before the command key
##Copy tmux paste buffer to CLIPBOARD
bind C-c send-keys 'Enter' \; 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"
setw -g mode-keys vi
# bind ^A space to go to the next window
bind-key C-a last-window
bind-key Space next-window
bind-key C-Space previous-window
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+