Files
dotfiles/config/tmux/scratch
2023-09-14 11:18:38 +05:30

10 lines
268 B
Bash
Executable File

#!/bin/sh
width=${2:-95%}
height=${2:-95%}
if [ "$(tmux display-message -p -F "#{session_name}")" = "scratch" ];then
tmux detach-client
else
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch"
fi