A simple tmux plugin for managing a "scratch" session that allows easy attachment or creation of a scratch session in a tmux popup using a keyboard shortcut without needing to switch out of what you are doing.
M-ito create or attach to ascratchtmux session.- If the
scratchsession exists, it detaches the current client. - If the
scratchsession doesn't exist, it creates and attaches to it. - Provides a popup when creating the
scratchsession for easy interaction.
- If the
prefix-nto create or attach to a new tmux session from thecurrent_pane_path- If a session named using
current_pane_pathexists, it detaches the current client and attaches to it - If a session named using
current_pane_pathdoesn't exist, it creates and attaches to it. - Provide a way to quickly create a new session (or
themastersheep/tmux-workspaces) from thescratchpopup
- If a session named using
tmux 1.9 or higher, bash,
tmux-scratch plugin.
Installation with Tmux Plugin Manager (recommended)
Please make sure you have tmux-scratch installed.
Add plugin to the list of TPM plugins in .tmux.conf:
set -g @plugin 'themastersheep/tmux-scratch'
Hit prefix + I to fetch the plugin and source it. The plugin will
automatically start "working" in the background, no action required.
Please make sure you have tmux-scratch installed.
Clone the repo:
$ git clone https://github.com/themastersheep/tmux-scratch ~/clone/path
Add this line to the bottom of .tmux.conf:
run-shell ~/clone/path/scratch.tmux
Reload TMUX environment with: $ tmux source-file ~/.tmux.conf
The plugin will automatically start "working" in the background, no action required.