Some times you need a scratch terminal. tmux-floating-terminal will quickly load a floating pane with a new tmux session. This floating pane can be detached and reattached.
- tmux >= 3.2
- Linux
- *macOS
- *Cygwin
- *Windows Subsystem for Linux (WSL)
* untested, should work.
Installation via (recommended) TPM
Add plugin to the list of TPM plugins in ~/.tmux.conf
:
set -g @plugin 'lloydbond/tmux-floating-terminal'
<optional>
set -g @floating_scratch_term 'M-i'
set -g @floating_scratch_to_active_win 'M-h'
set -g @floating_scratch_to_win 'M-l'
set -g @floating_active_pane_to_scratch 'M-m'
Hit tmux-prefix + I to fetch the plugin and source it. You should now be able to use the plugin.
Clone the repository:
git clone https://github.com/lloydbond/tmux-floating-terminal.git ~/.tmux-floating-terminal
Add the following to .tmux.conf
:
run-shell ~/.tmux-floating-terminal/floating_plugin.tmux
Reload tmux:
tmux source-file ~/.tmux.conf
- Open/Close scratch terminal tmux-prefix alt + i
- Convert scratch terminal to active window tmux-prefix> alt + h
- Convert scratch terminal to next-window tmux-prefix> alt + l
- Convert convert current pane into popup scratech tmux-prefix> alt + m
- Note: scratch popup must be unused for now. Will improve funcitonality to play fairly in the future.