Files
nixos/home/.local/usr/bin/popuptmux
2025-08-15 17:44:24 -04:00

11 lines
407 B
Bash
Executable File

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