Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Minetest Server Tester
while [[ $COUNT -ne 50 ]]; do
# Run minetest directly to server and free terminal input (&)
./minetest --go --address 123.456.78.9 --port 30000 --name 'LoadTester'$COUNT --password 'password123' &
# Record PID
sleep 0.5
# Get window id
while [ "$WID" == "" ]; do
WID=$(wmctrl -lp | grep $PID | cut "-d " -f1)
# Rename window (to avoid title conflicts on next id search - this could be done better)
wmctrl -r 'Minetest 5.0.0-dev-b7e1bca2-dirty [Main Menu]' -N 'LoadTester'$COUNT
# Unmaximize window and resize to 0
wmctrl -i -r $WID -b remove,maximized_vert; wmctrl -i -r $WID -b remove,maximized_horz;wmctrl -i -r $WID -e 0,0,0,0,0
# Increment and wait to not choke
sleep 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.