diff --git a/home/packages/custom/project/default.nix b/home/packages/custom/project/default.nix index 4256769..ffc0467 100644 --- a/home/packages/custom/project/default.nix +++ b/home/packages/custom/project/default.nix @@ -37,12 +37,28 @@ writeShellApplication { editorPath="$projectRoot/htdocs" fi - # Open Editor + # Start new session with editor as name for first window tmux new-session -s "$session" -n editor -d - tmux send-keys "export TYPO3_BASE=$url TYPO3_COMPOSER_AUTOLOAD=1 SOLR_HOST=localhost SOLR_PORT=8983 SOLR_SCHEME=http SOLR_CORE=core_de" C-m - tmux send-keys "export typo3DatabaseName=testing typo3DatabaseHost=localhost typo3DatabaseUsername=testing typo3DatabasePassword=testing" C-m + + # Set environment + tmux set-environment -t "$session" TYPO3_BASE "$url" + tmux set-environment -t "$session" TYPO3_COMPOSER_AUTOLOAD 1 + + tmux set-environment -t "$session" typo3DatabaseName testing + tmux set-environment -t "$session" typo3DatabaseHost localhost + tmux set-environment -t "$session" typo3DatabaseUsername testing + tmux set-environment -t "$session" typo3DatabasePassword testing + tmux set-environment -t "$session" TYPO3_DATABASE "$databaseName" + # TODO: Find a better way to determine instance path for acceptance tests - tmux send-keys "export INSTANCE_PATH=\"$editorPath/typo3temp/var/tests/acceptance\"" C-m + tmux set-environment -t "$session" INSTANCE_PATH "$editorPath/typo3temp/var/tests/acceptance" + + tmux set-environment -t "$session" SOLR_HOST localhost + tmux set-environment -t "$session" SOLR_PORT 8983 + tmux set-environment -t "$session" SOLR_SCHEME http + tmux set-environment -t "$session" SOLR_CORE core_de + + # Open Editor tmux send-keys " renice -n 5 \$\$" C-m tmux send-keys " cd $editorPath" C-m tmux send-keys C-l @@ -53,15 +69,7 @@ writeShellApplication { tmux new-window -n project -t "$session" tmux send-keys -t "$session:$windowId" "cd $editorPath" C-m tmux send-keys " renice -n 5 \$\$" C-m - tmux send-keys "export TYPO3_BASE=$url TYPO3_COMPOSER_AUTOLOAD=1 SOLR_HOST=localhost SOLR_PORT=8983 SOLR_SCHEME=http SOLR_CORE=core_de" C-m - tmux send-keys "export typo3DatabaseName=testing typo3DatabaseHost=localhost typo3DatabaseUsername=testing typo3DatabasePassword=testing" C-m tmux send-keys C-l - if [ "$databaseName" != "" ]; then - tmux send-keys "export TYPO3_DATABASE=$databaseName" C-m - tmux send-keys C-l - else - tmux send-keys "export TYPO3_DATABASE=" - fi (( "windowId+=1" )) tmux select-pane -t 0