Move append existing session logic to launcher

This commit is contained in:
Yan Lin 2025-07-29 19:30:02 +02:00
parent e95e125151
commit d272de21c3
3 changed files with 11 additions and 11 deletions

View file

@ -11,11 +11,6 @@ if [ -z "$SESSION_NAME" ] || [ -z "$CODE_PATH" ]; then
exit 1
fi
if tmux has-session -t $SESSION_NAME 2>/dev/null; then
tmux attach-session -t $SESSION_NAME
exit 0
fi
tmux new-session -d -s $SESSION_NAME -c "$CODE_PATH"
tmux rename-window -t $SESSION_NAME:1 "nvim"
tmux send-keys -t $SESSION_NAME:1 "nvim" C-m