From 65f58f14ef9df4dccf3d3d3bef65d175acdf2edb Mon Sep 17 00:00:00 2001 From: Nico Harather Date: Mon, 18 Nov 2024 16:17:47 +0100 Subject: [PATCH] Remove tmux startup script, add to gitignore --- .gitignore | 4 +++- sup.sh | 32 -------------------------------- 2 files changed, 3 insertions(+), 33 deletions(-) delete mode 100755 sup.sh diff --git a/.gitignore b/.gitignore index c4b5bd6..6fb5434 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ example example-server-bootstrap example - *_templ.go handoff.db + +# tmux startup script +sup.sh diff --git a/sup.sh b/sup.sh deleted file mode 100755 index 7e61fe0..0000000 --- a/sup.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -SESSION_NAME="handoff" -PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -# Check if the session already exists, attach if it does, otherwise create it -tmux has-session -t $SESSION_NAME 2>/dev/null -if [ $? != 0 ]; then - # Create new tmux session with the working directory set - tmux new-session -d -s $SESSION_NAME -c $PROJECT_DIR - - # Create a window for nvim - tmux rename-window -t $SESSION_NAME:1 'nvim' - tmux send-keys -t $SESSION_NAME:1 -c $PROJECT_DIR 'nvim' C-m - - # Create a window for running commands - tmux new-window -t $SESSION_NAME:2 -n 'run' -c $PROJECT_DIR - tmux send-keys -t $SESSION_NAME:2 'echo "Use this window to run commands"' C-m - - # Create a window for running the backend server - tmux new-window -t $SESSION_NAME:3 -n 'backend' -c $PROJECT_DIR - tmux send-keys -t $SESSION_NAME:3 'go run ./cmd/example-server-bootstrap/' C-m -fi - -# Switch back to nvim window -tmux select-window -t $SESSION_NAME:1 - -# Press 's' key to continue with the nvim session -tmux send-keys -t $SESSION_NAME:1 's' C-m - -# Attach to the session -tmux attach-session -t $SESSION_NAME