Last active
February 20, 2025 13:01
-
-
Save timothybasanov/00f109853d73135749ccd4884312bcb0 to your computer and use it in GitHub Desktop.
byobu/tmux configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/dustinkirkland/byobu/commit/755c0e9f28b3f8ee57d9c7fc166f0bcbe96577db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fix pbcopy, subl and byobu help window: | |
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard | |
# Should be done before the first session is created. | |
if-shell 'command -v reattach-to-user-namespace' 'set-option -g default-command "reattach-to-user-namespace -l ${SHELL}"' | |
# Tmux Plugin Manager (TPM) configuration section: | |
# 0) Update .tmux.conf with this configuration | |
# 1) git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
# 2) ~/.tmux/plugins/tpm/bin/install_plugins | |
# 3) tmux kill-server | |
# Configure resurrect/continuum to save/restore automatically | |
# ^a^s to manually save and ^a^r to manually restore. | |
set -g @resurrect-capture-pane-contents 'on' | |
set -g @continuum-restore 'on' | |
set -g @tpm_plugins ' \ | |
tmux-plugins/tpm \ | |
tmux-plugins/tmux-resurrect \ | |
tmux-plugins/tmux-continuum \ | |
' | |
# Init TPM | |
# Should be done before the first session is created | |
if-shell 'test -x ~/.tmux/plugins/tpm/tpm' 'run ~/.tmux/plugins/tpm/tpm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bind Ctrl-A prefix | |
unbind-key -n C-a | |
set -g prefix ^A | |
set -g prefix2 ^A | |
bind a send-prefix | |
# Enable mouse support | |
set -g mouse on | |
# Mouse (tmux) selection copy: Enter or c | |
# Requires tmux 2.4 | |
unbind-key -T copy-mode-vi MouseDragEnd1Pane | |
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'command -v reattach-to-user-namespace >/dev/null && reattach-to-user-namespace pbcopy || pbcopy' | |
bind-key -T copy-mode-vi c send -X copy-pipe-and-cancel 'command -v reattach-to-user-namespace >/dev/null && reattach-to-user-namespace pbcopy || pbcopy' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment