i create a script that is supposed to create a new workspace and that workspace launch four terminal each in given position with a command ran in it.
this is the script.sh
#!/usr/bin/env bash
WS='9:Dashboard'
# Switch to the workspace
i3-msg "workspace $WS"
# Launch terminals and immediately move them to the workspace
gnome-terminal --title=MATRIX -- bash -lc 'cmatrix -C green; exec bash' &
gnome-terminal --title=CLOCK -- bash -lc 'tty-clock -c -C 4; exec bash' &
gnome-terminal --title=SPOTIFY -- bash -lc 'spotify_player; exec bash' &
gnome-terminal --title=ASCII -- bash -lc 'cat ~/.config/dashbord_art.txt; exec bash' &
# Additional wait for all windows to be ready
sleep 0.3
# Position and resize windows
i3-msg '[title="^MATRIX$"] floating enable, border none, move position 105 131, resize set 80>
i3-msg '[title="^CLOCK$"] floating enable, border none, move position 1304 374, resize set 49>
i3-msg '[title="^SPOTIFY$"] floating enable, border none, move position 931 132, resize set 8>
i3-msg '[title="^ASCII$"] floating enable, border none, move position 933 373, resize set 354>
the problem is that when i run it, a new workspace does get created but the terminals open in the current workspace instead.
how to solve that.