Created
August 29, 2021 22:43
-
-
Save garygan89/7284160348f28a65e4c99c719278ab25 to your computer and use it in GitHub Desktop.
Easy install tmux resurrect and continuum
This file contains hidden or 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
#!/bin/bash | |
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
cat <<EOF > ~/.tmux.conf | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
# Plugin: tmux-resurrect | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
# enable restore pane contents | |
set -g @resurrect-capture-pane-contents 'on' | |
# Plugin: tmux-continuum | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
# enable automatic restore in tmux-continuum, i.e. | |
# Last saved environment is automatically restored | |
# when tmux is started. | |
set -g @continuum-restore 'on' | |
# Other examples: | |
# set -g @plugin 'github_username/plugin_name' | |
# set -g @plugin 'github_username/plugin_name#branch' | |
# set -g @plugin '[email protected]:user/plugin' | |
# set -g @plugin '[email protected]:user/plugin' | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run '~/.tmux/plugins/tpm/tpm' | |
EOF | |
echo "Done writing to ~/.tmux.conf!" | |
echo "If you are not in tmux session, run the following" | |
echo "tmux source ~/.tmux.conf" | |
echo "" | |
echo "If you are already in tmux session, run the following" | |
echo "prefix, then source ~/tmux.conf" | |
echo "" | |
echo "If you are not in tmux session, create one!" | |
echo "Then press prefix (ctrl+b) and I (capital letter i) to start install the plugin!" | |
echo "Installing tmux-resurrect..." | |
cat <<EOF >> ~/.tmux.conf | |
# tmux-resurrect plugin" | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
# enable restore pane contents | |
set -g @resurrect-capture-pane-contents 'on' | |
EOF | |
echo "Installing tmux-continuum..." | |
cat <<EOF >> ~/.tmux.conf | |
# tmux-continuum plugin | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
# enable automatic restore in tmux-continuum, i.e. | |
# Last saved environment is automatically restored | |
# when tmux is started. | |
set -g @continuum-restore 'on' | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment