Added copy of script to the source files and cleaned up readme

This commit is contained in:
bepis
2026-04-23 12:57:29 +10:00
parent e94363eb9c
commit 66ef04dd4e
2 changed files with 50 additions and 11 deletions

30
taptaploot-forward.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# Launches TapTapLoot in rootful Xwayland
# Steam launch option: ~/.local/bin/taptaploot-forward.sh %command%
for i in $(seq 10 30); do
if [ ! -e "/tmp/.X11-unix/X$i" ]; then
GAME_DISPLAY=":$i"
break
fi
done
GAME_XAUTH=$(mktemp /tmp/taptaploot-xauth.XXXXXX)
COOKIE=$(mcookie)
xauth -f "$GAME_XAUTH" add "$GAME_DISPLAY" . "$COOKIE"
cleanup() {
kill "$XWAYLAND_PID" 2>/dev/null
wait "$XWAYLAND_PID" 2>/dev/null
rm -f "$GAME_XAUTH"
}
trap cleanup EXIT INT TERM
XAUTHORITY="$GAME_XAUTH" Xwayland "$GAME_DISPLAY" -geometry 1920x1080 -noreset -auth "$GAME_XAUTH" &
XWAYLAND_PID=$!
sleep 1
DISPLAY="$GAME_DISPLAY" XAUTHORITY="$GAME_XAUTH" "$@" &
GAME_PID=$!
wait "$GAME_PID"