Files
dotfiles/config/tmux/scratch
Uttarayan Mondal 3aa904f20d [fix] Use /bin/sh
2023-08-07 13:58:53 +05:30

10 lines
268 B
Bash
Executable File

#!/bin/sh
width=${2:-80%}
height=${2:-80%}
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