Update tmux conf to use TPM. Install tmux-yank and tmux-sensible.

Also added README to describe configuration details.
This commit is contained in:
2025-09-07 00:31:57 -07:00
parent 7fa043bf65
commit 3bb4efec0d
2 changed files with 13 additions and 27 deletions

3
tmux/README.md Normal file
View File

@@ -0,0 +1,3 @@
Tmux config. Don't forget to install TPM:
`git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm`

View File

@@ -4,20 +4,13 @@ unbind-key C-a
bind-key C-a send-prefix bind-key C-a send-prefix
set -g base-index 1 set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# vi is good # vi is good
set-window-option -g mode-keys vi set-window-option -g mode-keys vi
# set copy hotkeys
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# mouse behavior # mouse behavior
set -g mouse on set -g mouse on
set-option -g default-terminal screen-256color # Keyboard shortcuts
bind-key : command-prompt bind-key : command-prompt
bind-key r refresh-client bind-key r refresh-client
bind-key L clear-history bind-key L clear-history
@@ -34,8 +27,6 @@ bind-key j select-pane -D
bind-key k select-pane -U bind-key k select-pane -U
bind-key l select-pane -R bind-key l select-pane -R
bind-key C-o rotate-window
bind-key + select-layout main-horizontal bind-key + select-layout main-horizontal
bind-key = select-layout main-vertical bind-key = select-layout main-vertical
set-window-option -g other-pane-height 25 set-window-option -g other-pane-height 25
@@ -43,40 +34,32 @@ set-window-option -g other-pane-width 80
bind-key a last-pane bind-key a last-pane
bind-key q display-panes bind-key q display-panes
set-window-option -g display-panes-time 1500
bind-key c new-window bind-key c new-window
bind-key t next-window bind-key t next-window
bind-key T previous-window bind-key T previous-window
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
bind-key [ copy-mode bind-key [ copy-mode
bind-key ] paste-buffer bind-key ] paste-buffer
set-window-option -g display-panes-time 1500
# Status Bar # Status Bar
set-option -g status-interval 1 set-option -g status-interval 1
set-option -g status-left '' set-option -g status-left ''
set-option -g status-right '%l:%M%p' set-option -g status-right '%l:%M%p'
# set-window-option -g window-status-current-fg magenta
# set-option -g status-fg default
# set-option -g status-bg black
# Set window notifications # Set window notifications
setw -g monitor-activity on setw -g monitor-activity on
set -g visual-activity on set -g visual-activity on
# Enable native Mac OS X copy/paste
# set-option -g default-command "/bin/bash -c 'which reattach-to-user-namespace >/dev/null && exec reattach-to-user-namespace $SHELL -l || exec $SHELL -l'"
# Allow the arrow key to be used immediately after changing windows # Allow the arrow key to be used immediately after changing windows
set-option -g repeat-time 0 set-option -g repeat-time 0
# Fix to allow mousewheel/trackpad scrolling in tmux 2.1 # List of plugins
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" set -g @plugin 'tmux-plugins/tpm'
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
# Disable assume-paste-time, so that iTerm2's "Send Hex Codes" feature works # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# with tmux 2.1. This is backwards-compatible with earlier versions of tmux, run '~/.tmux/plugins/tpm/tpm'
# AFAICT.
set-option -g assume-paste-time 0
# prevent escape delay for vim
set -sg escape-time 0