diff --git a/sessions/sync.sh b/sessions/sync.sh index febb0f0..fa7cef7 100755 --- a/sessions/sync.sh +++ b/sessions/sync.sh @@ -1,17 +1,16 @@ # alias wezterm='flatpak run org.wezfurlong.wezterm' -win=$(flatpak run org.wezfurlong.wezterm cli spawn --new-window) -flatpak run org.wezfurlong.wezterm cli set-window-title --pane-id $win "Syncopotamus" +flatpak run org.wezfurlong.wezterm cli set-window-title "syncopotamus" -flatpak run org.wezfurlong.wezterm cli set-tab-title --pane-id $win "Go" -echo "cd ~/repos/syncopotamus-go" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $win -echo "export SYNCOPOTAMUS_BC_CLIENT_ID='de4602c11dcdacfbe8f1a172f84b4e88b7a1adeb'" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $win -echo "export SYNCOPOTAMUS_BC_CLIENT_SECRET='710ddd0ec04c098adca8564e4caab2c7034ad272'" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $win -echo "export SYNCOPOTAMUS_BC_REDIRECT_SERVER='http://localhost'" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $win -echo "clear" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $win -echo "go run ." | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $win +flatpak run org.wezfurlong.wezterm cli set-tab-title "Go" +echo "cd ~/repos/syncopotamus-go" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste +echo "export SYNCOPOTAMUS_BC_CLIENT_ID='de4602c11dcdacfbe8f1a172f84b4e88b7a1adeb'" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste +echo "export SYNCOPOTAMUS_BC_CLIENT_SECRET='710ddd0ec04c098adca8564e4caab2c7034ad272'" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste +echo "export SYNCOPOTAMUS_BC_REDIRECT_SERVER='http://localhost'" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste +echo "clear" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste +echo "go run ." | flatpak run org.wezfurlong.wezterm cli send-text --no-paste -pane=$(flatpak run org.wezfurlong.wezterm cli split-pane --left --pane-id $win) +pane=$(flatpak run org.wezfurlong.wezterm cli split-pane --left) echo "cd ~/repos/syncopotamus-go" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $pane echo "nvim" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $pane flatpak run org.wezfurlong.wezterm cli adjust-pane-size --amount 50 --pane-id $pane right diff --git a/sessions/syncrails.sh b/sessions/syncrails.sh index 43f923b..d6dcc17 100755 --- a/sessions/syncrails.sh +++ b/sessions/syncrails.sh @@ -3,17 +3,21 @@ PANE=$(flatpak run org.wezfurlong.wezterm cli list | grep syncopotamus | head -n if [ -n "${PANE}" ]; then PANE=$(flatpak run org.wezfurlong.wezterm cli spawn --pane-id $PANE) echo "Opening Rails in existing window" + flatpak run org.wezfurlong.wezterm cli set-tab-title --pane-id $PANE "Rails" + echo "cd ~/repos/syncopotamus-rails" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $PANE + echo "rvm use 3.3.1" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $PANE + echo "rails s" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $PANE + PANE=$(flatpak run org.wezfurlong.wezterm cli split-pane --left --pane-id $PANE) else - PANE=$(flatpak run org.wezfurlong.wezterm cli spawn --new-window) - echo "Opening Rails in new window" + echo "Opening Rails in this window" + flatpak run org.wezfurlong.wezterm cli set-tab-title "Rails" + echo "cd ~/repos/syncopotamus-rails" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste + echo "clear" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste + echo "rvm use 3.3.1" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste + echo "rails s" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste + PANE=$(flatpak run org.wezfurlong.wezterm cli split-pane --left) fi -flatpak run org.wezfurlong.wezterm cli set-tab-title --pane-id $PANE "Rails" - -echo "cd ~/repos/syncopotamus-rails" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $PANE -echo "rails s" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $PANE - -PANE=$(flatpak run org.wezfurlong.wezterm cli split-pane --left --pane-id $PANE) echo "cd ~/repos/syncopotamus-rails" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $PANE echo "nvim" | flatpak run org.wezfurlong.wezterm cli send-text --no-paste --pane-id $PANE flatpak run org.wezfurlong.wezterm cli adjust-pane-size --amount 50 --pane-id $PANE right