From 2974df409a81987eaf07114621574e3ffba76181 Mon Sep 17 00:00:00 2001 From: Carlos Aldana Date: Sat, 23 Mar 2024 11:32:10 -0700 Subject: [PATCH] updates sessions to split opening with and without a specific terminal --- sesh | 29 +++++++++++++++++++++++++---- tmux-sessions/linkedag-web.sh | 3 +++ tmux-sessions/linkedag.sh | 6 +++--- tmux-sessions/syncopotamus-web.sh | 15 +++++++++++++++ tmux-sessions/syncopotamus.sh | 2 -- 5 files changed, 46 insertions(+), 9 deletions(-) create mode 100755 tmux-sessions/linkedag-web.sh create mode 100755 tmux-sessions/syncopotamus-web.sh diff --git a/sesh b/sesh index da3dcc9..d472247 100755 --- a/sesh +++ b/sesh @@ -1,10 +1,31 @@ #!/bin/bash + +directory=~/linux-setup/tmux-sessions + +usage() { + echo "Usage: $0 [-t] " + echo " -t: Add " + exit 1 +} + +# Check if no parameter is provided +if [ $# -eq 0 ]; then + usage +fi + +# Check for optional flag +if [ "$1" == "-t" ]; then + # Check if no session parameter is provided after the flag + if [ $# -lt 2 ]; then + usage + fi + flatpak run org.wezfurlong.wezterm start $directory/$2.sh +else + exec "$directory/$1.sh" +fi + # Check if no parameter is provided if [ $# -eq 0 ]; then echo "Error: No parameter provided. Please provide a session." exit 1 fi - -# Echo the provided session parameter -echo "Session: $1" -flatpak run org.wezfurlong.wezterm start ~/linux-setup/tmux-sessions/$1.sh diff --git a/tmux-sessions/linkedag-web.sh b/tmux-sessions/linkedag-web.sh new file mode 100755 index 0000000..2e059b2 --- /dev/null +++ b/tmux-sessions/linkedag-web.sh @@ -0,0 +1,3 @@ +firefox https://bigdrumdigital.teamwork.com/app/projects/620980/time & +firefox https://3.basecamp.com/5456546/buckets/36188668/card_tables/7047790073 & +mongodb-compass & diff --git a/tmux-sessions/linkedag.sh b/tmux-sessions/linkedag.sh index 59b9a42..9214b64 100755 --- a/tmux-sessions/linkedag.sh +++ b/tmux-sessions/linkedag.sh @@ -1,6 +1,6 @@ -firefox https://bigdrumdigital.teamwork.com/app/projects/620980/time & -firefox https://3.basecamp.com/5456546/buckets/36188668/card_tables/7047790073 & -mongodb-compass & +# firefox https://bigdrumdigital.teamwork.com/app/projects/620980/time & +# firefox https://3.basecamp.com/5456546/buckets/36188668/card_tables/7047790073 & +# mongodb-compass & tmux new-session -s linkedag -d -c ~/repos/linkedag-backend -n backend tmux split-window -h -c ~/repos/linkedag-backend diff --git a/tmux-sessions/syncopotamus-web.sh b/tmux-sessions/syncopotamus-web.sh new file mode 100755 index 0000000..6e0f493 --- /dev/null +++ b/tmux-sessions/syncopotamus-web.sh @@ -0,0 +1,15 @@ +firefox https://3.basecamp.com/5456546/buckets/34127086/card_tables/6496384013 + +# tmux new-session -s syncopotamus -d -c ~/repos/syncopotamus-go -n backend +# tmux split-window -h -c ~/repos/syncopotamus-go +# tmux send-keys -t syncopotamus:backend.0 'nvim' C-m +# tmux send-keys -t syncopotamus:backend.1 'go run .' C-m +# +# tmux new-window -c ~/repos/syncopotamus-svelte -n frontend +# tmux split-window -h -c ~/repos/syncopotamus-svelte +# tmux send-keys -t syncopotamus:frontend.0 'nvim' C-m +# tmux send-keys -t syncopotamus:frontend.1 'npm run dev' C-m +# +# tmux select-window -t syncopotamus:backend +# tmux select-pane -t 0 +# tmux -2 attach-session -t syncopotamus diff --git a/tmux-sessions/syncopotamus.sh b/tmux-sessions/syncopotamus.sh index 97fec2c..000c7c0 100755 --- a/tmux-sessions/syncopotamus.sh +++ b/tmux-sessions/syncopotamus.sh @@ -1,5 +1,3 @@ -firefox https://3.basecamp.com/5456546/buckets/34127086/card_tables/6496384013 & - tmux new-session -s syncopotamus -d -c ~/repos/syncopotamus-go -n backend tmux split-window -h -c ~/repos/syncopotamus-go tmux send-keys -t syncopotamus:backend.0 'nvim' C-m