Co-authored-by: enricobuehler <buehler@unom.io>
Game slots
A punktfunk plugin. It keeps a copy of a game's config or save files for each device that streams it, and swaps that copy in before the game starts. Play at the PC with your monitor's settings, on the Steam Deck with the Deck's, on the TV with the TV's.
Needs punktfunk 0.41 or later.
Set it up
- Install Game slots from the console's Plugins page.
- Open a game in the Library and pick the Game slots tab.
- Turn on Keep a slot per device and add the game's config or save folders.
- Save. The console grants the plugin write access to each folder you added, and to the folder holding each file. Remove a path and save to take that access back; a folder another game still uses keeps it.
Turn on A slot per settings preset to give one device a slot for each of its presets, like Docked and Handheld.
What happens
- Before the launch: the host holds the game while the plugin copies the host's own files aside and puts the device's slot in their place. A device's first launch starts from the host's files.
- After the game exits: the plugin saves the files into the device's slot and puts the host's own back. If the game never ran, the launching device disconnecting does the same.
- The host's own files are what's on disk whenever no device's slot is in place. Play at the PC as usual.
The tab shows which slot is in place, each slot with the files it holds and when it was last saved, and anything the plugin skipped.
Paths
- Use absolute paths. On Linux,
~/.config/<game>works. - On Windows, write the full
C:\Users\<you>\Documents\My Games\<game>. The plugin runs as a service account, so%APPDATA%points somewhere else. - A folder is swapped as a whole. A single file works too.
What it doesn't do
- Steam Cloud: a synced save folder raises Steam's conflict dialog after a swap. Track the game's config, not its cloud saves, or turn Steam Cloud off for that game.
- A game started by hand inside a desktop stream isn't swapped. Only launches from a client's library or a GameStream app get a slot.
- A game already running when a device launches it isn't swapped.
- Devices must be paired. An unpaired device gets no slot.
Slots live in the plugin's state folder, <config>/plugin-state/game-slots/slots, as plain
folders: one per game, then one per device. Each tracked path is kept under a short hash of the
path, so a file's copy has no extension. local holds the host's own files only while a device's
slot is in place.
Use of AI
This project uses AI for writing code.
License
MIT or Apache-2.0, at your option.