A persistent scratchpad shell session always one keystroke away.
Opens a new tmux split containing a persistent shell session inside it.
Install tpm and add the following line to your ~/.tmux.conf
.
set-option -g @plugin 'doomhammer/tmux-scratch'
then, press Prefix + I
in tmux session.
Default key binding is Prefix + b
. If you want to change this key binding, set the following line in your ~/.tmux.conf
.
set-option -g @scratch-key 'x' # or your favorite key binding
Default split-window
size is 20. If you want to change this size, set the following line to your ~/.tmux.conf
.
set-option -g @scratch-size 15 # or your favorite size
or
set-option -g @scratch-size 20% # if you like to keep things relative
Default split-window
orientation is vertical. If you want to change this orientation, set the following line in your ~/.tmux.conf
.
set-option -g @scratch-orientation 'h'
Default command run as the session is $(getent passwd $(whoami)| sed -e 's/.*://')
. If you want to change this orientation, set the following line in your ~/.tmux.conf
.
set-option -g @scratch-cmd '/bin/zsh'
MIT
Thanks to:
- knakayama for the
tmux-man
that inspired this