mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 05:29:09 -07:00
79 lines
2.3 KiB
Bash
79 lines
2.3 KiB
Bash
# Update environment on reconnect
|
|
set -g update-environment "DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION"
|
|
|
|
# Use symlink socket
|
|
set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock
|
|
|
|
# Custom binds
|
|
bind K confirm kill-server
|
|
bind X confirm kill-window
|
|
bind ^[ copy-mode
|
|
bind R source-file ~/.tmux.conf \; display-message " Config reloaded.."
|
|
|
|
# Scrollback
|
|
set -g history-limit 10000
|
|
|
|
# Start indexing from 1
|
|
set -g base-index 1
|
|
set -g pane-base-index 1
|
|
|
|
# Terminal emulator window title
|
|
set -g set-titles on
|
|
set -g set-titles-string '#h:#S:#I.#P #W#{?pane_title, (#{pane_title}),}'
|
|
|
|
# Set keybindings
|
|
set -g mode-keys vi
|
|
set -g status-keys vi
|
|
|
|
# Set a terminal name but also enable 24 bit support in tmux
|
|
set -g default-terminal tmux-256color
|
|
set -as terminal-features ",xterm-256color:RGB"
|
|
set-env -g COLORTERM "truecolor"
|
|
|
|
# Activity
|
|
setw -g monitor-activity on
|
|
set -g visual-activity on
|
|
|
|
# Autorename new tabs automatically
|
|
setw -g automatic-rename on
|
|
|
|
# Color scheme
|
|
source-file ~/.tmux/tmux-solarized-256.conf
|
|
|
|
# Provide a statusbar
|
|
set -g window-status-current-style fg=colour235,bg=colour33,bold
|
|
set -g status-interval 60
|
|
set -g status-left-length 30
|
|
set -g status-left '/#h: #S/ '
|
|
set -g status-right '#{?pane_title,/#{pane_title}/ ,}#(uptime | rev | cut -d":" -f1 | rev | sed s/,//g)#[default] #[fg=colour166]%H:%M#[default]'
|
|
|
|
# Advanced mouse mode from http://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/
|
|
# Toggle mouse on
|
|
bind m \
|
|
set -g mode-mouse on \;\
|
|
set -g mouse-resize-pane on \;\
|
|
set -g mouse-select-pane on \;\
|
|
set -g mouse-select-window on \;\
|
|
display 'Mouse: ON'
|
|
|
|
# Toggle mouse off
|
|
bind M \
|
|
set -g mode-mouse off \;\
|
|
set -g mouse-resize-pane off \;\
|
|
set -g mouse-select-pane off \;\
|
|
set -g mouse-select-window off \;\
|
|
display 'Mouse: OFF'
|
|
|
|
# tmux X clipboard integration
|
|
if-shell 'test "$(uname)" = "Darwin"' \
|
|
'bind C-c run "tmux show-buffer | pbcopy"; bind C-v run "tmux set-buffer -- \"$(pbpaste)\"; tmux paste-buffer"' \
|
|
'bind C-c run "tmux show-buffer | xsel -i -b"; bind C-v run "tmux set-buffer -- \"$(xsel -o -b)\"; tmux paste-buffer"'
|
|
|
|
# List of plugins
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
set -g @plugin 'tmux-plugins/tmux-logging'
|
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
run '~/.tmux/plugins/tpm/tpm'
|