mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:46:41 +00:00
Update .tmux.conf
The mouse hacks for Tmux 2.1 are no longer needed, as most of the mouse features were added back in Tmux 2.2. Also the "tmux-better-mouse-mode" makes things better overall, and makes Tmux 2.1 scroll correctly too.
This commit is contained in:
33
tmux.conf
33
tmux.conf
@@ -7,31 +7,12 @@ bind C-q send-prefix
|
||||
set -g default-terminal "screen-256color"
|
||||
set -g detach-on-destroy on
|
||||
set -g history-limit 50000
|
||||
set -g mouse on
|
||||
|
||||
# Mouse support (pre Tmux 2.1)
|
||||
if-shell -b '[ "$(echo "$(tmux -V | cut -c 6-) < 2.1" | bc)" = 1 ]' \
|
||||
" \
|
||||
set -g mode-mouse on; \
|
||||
set -g mouse-resize-pane on; \
|
||||
set -g mouse-select-pane on; \
|
||||
set -g mouse-select-window on; \
|
||||
"
|
||||
|
||||
# Mouse support (Tmux 2.1 and later)
|
||||
# - scrolling behavior from: https://github.com/tmux/tmux/issues/145#issuecomment-151123624
|
||||
if-shell -b '[ "$(echo "$(tmux -V | cut -c 6-) >= 2.1" | bc)" = 1 ]' \
|
||||
" \
|
||||
set -g mouse on; \
|
||||
bind -n WheelUpPane if-shell -F -t = \"#{mouse_any_flag}\" \"send-keys -M\" \"if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'\"; \
|
||||
bind -n WheelDownPane select-pane -t= \\; send-keys -M; \
|
||||
"
|
||||
|
||||
# Mac OS X fix for pbcopy, pbpaste, and launchctl. Requires:
|
||||
# Pre-Tmux 2.6 macOS fix for pbcopy, pbpaste, and launchctl. Requires:
|
||||
# brew install reattach-to-user-namespace
|
||||
if-shell -b '[ -n "$(command -v reattach-to-user-namespace)" ]' \
|
||||
" \
|
||||
set-option -g default-command 'reattach-to-user-namespace -l $SHELL'; \
|
||||
"
|
||||
if-shell -b '[ "$(echo "$(tmux -V | cut -c 6-) < 2.6" | bc)" = 1 ] && [ -n "$(command -v reattach-to-user-namespace)" ]' \
|
||||
"set-option -g default-command 'reattach-to-user-namespace -l $SHELL'"
|
||||
|
||||
# Set window notifications
|
||||
setw -g monitor-activity on
|
||||
@@ -89,9 +70,13 @@ set -g @plugin 'jimeh/tmux-themepack'
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-copycat'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
|
||||
|
||||
# Set Theme
|
||||
# Set Theme from tmux-themepack
|
||||
set -g @themepack 'powerline/default/green'
|
||||
|
||||
# Configure tmux-yank
|
||||
set -g @yank_action 'copy-pipe'
|
||||
|
||||
# Init Plugin Manager
|
||||
run "${HOME}/.tmux/plugins/tpm/tpm"
|
||||
|
||||
Reference in New Issue
Block a user