Reputation: 43
How to create a script that runs gnu screen with multiple windows, each window runs a command For example
window 1 runs python3 -m http.server
window 2 runs webpack --watch
a screen with 2 windows start when I run script ./start.sh
Upvotes: 2
Views: 1440
Reputation: 43
I figured it out myselft, make a .screenrc file like this
startup_message off
caption always "%{= kw} %-w%{= gW} %n %t %{-}%+w %-="
screen -t http ./scripts/serve.sh
screen -t watch ./scripts/watch.sh
then run screen -c .screenrc
Upvotes: 2