1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-12-05 01:22:28 +00:00
dotfiles/tmux/.tmux.conf

122 lines
3.3 KiB
Plaintext
Raw Normal View History

2012-12-01 04:11:06 +00:00
#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
2015-09-18 00:14:17 +00:00
bind s split-window -v -c '#{pane_current_path}'
bind v split-window -h -c '#{pane_current_path}'
2012-12-01 04:11:06 +00:00
# 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
2020-04-15 15:19:21 +00:00
bind C break-pane
2012-12-01 04:11:06 +00:00
# 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
2012-12-01 04:11:06 +00:00
# Set status bar
2020-04-15 15:19:21 +00:00
set -g status-style bg=black,fg=white
set -g status-left '#[fg=yellow]#H #{?window_zoomed_flag,🔍, }'
set -g status-right '#[fg=yellow]#(uptime | sed -e "s/load average/load/g" -e "s/ / /g")' # | cut -d "," -f 2-)'
2012-12-01 04:11:06 +00:00
set -g status-right-length 50
# Highlight active window
2020-04-15 15:19:21 +00:00
set-window-option -g window-status-current-style bg=yellow,fg=black
#set -g window-status-format "#I:#{pane_current_path}"
#set -g window-status-current-format "#I:#{pane_current_path}"
set -g pane-border-status top
set -g pane-border-format '#(ps --no-headers -t #{pane_tty} -o args -O-c) @#{pane_current_path}'
# Dividing pane colors
set -g pane-border-style fg=magenta
set -g pane-active-border-style fg=yellow,bg=default
2012-12-01 04:11:06 +00:00
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# Automatically set window title
set-option -g status-interval 5
set-option -g automatic-rename on
2020-04-15 15:19:21 +00:00
set-option -g automatic-rename-format '#(dirname "#{pane_current_path}"| xargs -0 basename)/#(basename "#{pane_current_path}")'
# WM windows
set-option -g set-titles on
set-option -g set-titles-string "#S | #W"
2012-12-01 04:11:06 +00:00
# Mouse and panes
2016-10-07 22:46:55 +00:00
#set -g mouse-utf8 on
2015-11-25 02:24:33 +00:00
set -g mouse on
2012-12-01 04:11:06 +00:00
# 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
2016-03-09 14:16:31 +00:00
bind C-c run -b "tmux show-buffer | xclip -i -selection clipboard"
2012-12-01 04:11:06 +00:00
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
2016-03-09 14:16:31 +00:00
bind C-v run -b "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
2012-12-01 04:11:06 +00:00
# set vi keys
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
2017-12-03 14:42:16 +00:00
bind-key -T copy-mode v send -X begin-selection
bind-key -T copy-mode y send -X copy-selection
bind-key -T copy-mode C-v send -X rectangle-toggle
2012-12-01 04:11:06 +00:00
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"
2012-12-02 00:56:57 +00:00
#
# Look better
# look good
set -g default-terminal "screen-256color"
set-option -g default-shell ${SHELL}
2015-02-21 00:40:31 +00:00
# Maximise and minimise panes. TMUX NOW COMES WITH ZOOM: C-a z
unbind m
bind m run "tmux-zoom.sh"
2015-02-21 00:40:31 +00:00
2020-04-15 15:19:21 +00:00
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
2015-02-21 00:40:31 +00:00
# Fix for emacs and the like
set -s escape-time 0
# Start new-session as default
2020-04-15 15:19:21 +00:00
#new-session