From 66ef04dd4e9b5f7a93de00adf66b8cc580de0783 Mon Sep 17 00:00:00 2001 From: bepis Date: Thu, 23 Apr 2026 12:57:29 +1000 Subject: [PATCH] Added copy of script to the source files and cleaned up readme --- README.md | 31 ++++++++++++++++++++----------- taptaploot-forward.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 11 deletions(-) create mode 100644 taptaploot-forward.sh diff --git a/README.md b/README.md index fade699..bb4b95e 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ TapTapLoot is launched in a rootful Xwayland instance (via a Steam launch script - Linux (Wayland or X11) - Python 3.7+ - `xdotool` -- `xdotool` must be installed - Access to `/dev/input/` devices (via `input` group) - TapTapLoot running via the Xwayland launch script (see below) @@ -22,20 +21,26 @@ TapTapLoot is launched in a rootful Xwayland instance (via a Steam launch script ### 1. Install system dependencies ```bash -# Arch Linux / Bazzite / SteamOS +# Arch Linux sudo pacman -S xdotool python-pipx -# or on immutable distros (Bazzite, SteamOS): -ujust setup-decky # if needed, then use distrobox or toolbox for pipx + +# Fedora / Nobara +sudo dnf install xdotool pipx + +# Debian / Ubuntu +sudo apt install xdotool pipx ``` +> **Bazzite / immutable distros:** See the [Bazzite section](#bazzite--immutable-distro-installation) below. + ### 2. Install this tool ```bash # From this repo -pipx install git+https://gitea.example.com/yourname/TapTapLootForwarder.git +pipx install git+https://gitea.recka.tech/bepis/TapTapLootForwarder.git # Or from a local clone -git clone https://gitea.example.com/yourname/TapTapLootForwarder.git +git clone https://gitea.recka.tech/bepis/TapTapLootForwarder.git cd TapTapLootForwarder pipx install . ``` @@ -49,7 +54,7 @@ sudo usermod -aG input $USER ## Steam Launch Script -Save the following as `~/.local/bin/taptaploot-forward.sh` and make it executable (`chmod +x`): +Save the following as `~/.local/bin/taptaploot-forward.sh` (or download from the repo above) and make it executable (`chmod +x`): ```bash #!/bin/bash @@ -102,24 +107,28 @@ Keypresses will be forwarded to the game without it needing focus. Press `Ctrl+C ## Bazzite / Immutable Distro Installation -On Bazzite, Nobara, or SteamOS (which use immutable root filesystems), the recommended approach is to use a **Distrobox container**: +On Bazzite or SteamOS (which have immutable root filesystems), `pacman` can't install packages directly to the host. The recommended approach is a **Distrobox container**: ```bash -# Create an Arch-based container +# Create an Arch-based container (Bazzite has a shortcut for this) +ujust distrobox-arch +# or manually: distrobox create --name taptaploot --image archlinux:latest distrobox enter taptaploot # Inside the container: sudo pacman -S xdotool python-pipx sudo usermod -aG input $USER -pipx install git+https://gitea.example.com/yourname/TapTapLootForwarder.git +pipx install git+https://gitea.recka.tech/bepis/TapTapLootForwarder.git -# Export the command to your host +# Export the command to your host so you can run it outside the container distrobox-export --bin ~/.local/bin/taptaploot-forwarder ``` Then run `taptaploot-forwarder` from your host terminal as normal. +> **Note:** The `input` group change inside the container may still require a full logout/login on the host to take effect. If you get permission errors, try running `sudo taptaploot-forwarder` temporarily inside the container. + ## Troubleshooting **Permission denied on `/dev/input/`** — make sure you've added yourself to the `input` group and logged out/in. Temporarily use `sudo taptaploot-forwarder`. diff --git a/taptaploot-forward.sh b/taptaploot-forward.sh new file mode 100644 index 0000000..1afb7fd --- /dev/null +++ b/taptaploot-forward.sh @@ -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" \ No newline at end of file