Availability: the control API ships in the next LookPilot release (after 1.9.17). If the discovery file described below does not appear when the app runs, your version does not have it yet; update LookPilot.
LookPilot runs a local control API that lets you trigger tracker actions from outside the app: your window manager or desktop environment keybinds, shell scripts, or any tool that can make an HTTP request. This is the recommended way to set up keybinds on Linux, especially on Wayland, where applications cannot reliably capture global hotkeys themselves. Your WM or DE can always run a command on a keypress, and that command can tell LookPilot what to do.
| Action | What it does |
|---|---|
center |
Center tracking (same as the in-app Center hotkey) |
toggle |
Start / stop tracking |
pause |
Pause tracking (freezes the view at the current pose) |
set-game-center |
Save the current pose as the game-center offset |
status |
Print tracking state as JSON |
ping |
Check that LookPilot is running |
The actions behave exactly like pressing the matching in-app hotkey. The in-app hotkeys keep working; the control API is an addition, not a replacement.
The lookpilotctl helper script ships with LookPilot in the scripts/ folder of the install directory. It needs only Python 3, which every modern distribution ships. Copy it somewhere on your PATH:
cp "$HOME/.steam/root/steamapps/common/LookPilot/scripts/lookpilotctl" ~/.local/bin/
chmod +x ~/.local/bin/lookpilotctl
Test it while LookPilot is running:
lookpilotctl ping
lookpilotctl center
Use your normal keybind configuration and run lookpilotctl <action>.
i3 / sway (~/.config/i3/config or ~/.config/sway/config):
bindsym $mod+c exec lookpilotctl center
bindsym $mod+t exec lookpilotctl toggle
bindsym $mod+p exec lookpilotctl pause
Hyprland (~/.config/hypr/hyprland.conf):
bind = $mainMod, C, exec, lookpilotctl center
bind = $mainMod, T, exec, lookpilotctl toggle
bind = $mainMod, P, exec, lookpilotctl pause
KDE Plasma: System Settings -> Shortcuts -> Custom Shortcuts -> add a command shortcut running lookpilotctl center.
GNOME: Settings -> Keyboard -> Keyboard Shortcuts -> Custom Shortcuts -> add a shortcut with command lookpilotctl center.
On startup LookPilot writes a discovery file at ~/.config/lookpilot/control.json containing the API port and an access token:
{"app": "LookPilot", "port": 41417, "token": "<random per app start>"}
Any tool can read that file and call the API on 127.0.0.1:
PORT=$(python3 -c "import json;print(json.load(open('$HOME/.config/lookpilot/control.json'))['port'])")
TOKEN=$(python3 -c "import json;print(json.load(open('$HOME/.config/lookpilot/control.json'))['token'])")
curl -X POST -H "Authorization: Bearer $TOKEN" "http://127.0.0.1:$PORT/api/center"
Endpoints: POST /api/center, POST /api/toggle, POST /api/pause, POST /api/set-game-center, GET /api/status, GET /api/ping (ping needs no token). The token can also be passed as a ?token= query parameter.
The API only listens on 127.0.0.1 (your own machine) and every request except ping needs the token, so nothing on your network can control the tracker.
~/.var/app/com.valvesoftware.Steam/config/lookpilot/control.json instead. lookpilotctl checks both locations automatically.LOOKPILOT_CONTROL_DISABLED=1.lookpilotctl: LookPilot is not running: start LookPilot first; the discovery file only exists while the app runs.lookpilotctl center works in a terminal: your WM may run exec commands with a minimal PATH. Use the full path to the script in the keybind, e.g. exec ~/.local/bin/lookpilotctl center.LookPilot is not responding (stale control.json?): the app quit without cleaning up (e.g. it crashed). Restart LookPilot; the file is rewritten on every start.