63 lines
2.2 KiB
Markdown
63 lines
2.2 KiB
Markdown
|
|
# Session Switch
|
||
|
|
|
||
|
|
An OpenGamepadUI plugin that adds a **Switch to Steam** button to the power
|
||
|
|
menu so OpenGamepadUI can return to Steam game mode.
|
||
|
|
|
||
|
|
OpenGamepadUI's built-in ChimeraOS platform support adds a "Switch to Desktop"
|
||
|
|
button but has no way to get back to Steam game mode once you leave it. This
|
||
|
|
plugin adds the missing round-trip button.
|
||
|
|
|
||
|
|
## Features
|
||
|
|
|
||
|
|
- Adds a **Switch to Steam** button to the power menu, right above the exit
|
||
|
|
button.
|
||
|
|
- Returns to the session that was active before OpenGamepadUI took over, so
|
||
|
|
your autologin configuration is left untouched.
|
||
|
|
- Restarts InputPlumber before switching so the gamepad is not left in an
|
||
|
|
exclusive (blocked) state for Steam.
|
||
|
|
- No configuration required.
|
||
|
|
|
||
|
|
## Requirements
|
||
|
|
|
||
|
|
- ChimeraOS or SteamOS with OpenGamepadUI running as an exclusive session.
|
||
|
|
- Godot 4.4.x on the build machine (the plugin bytecode must match the Godot
|
||
|
|
version embedded in the OpenGamepadUI release you are targeting).
|
||
|
|
|
||
|
|
## Installation
|
||
|
|
|
||
|
|
Download the plugin zip and place it in the plugins directory
|
||
|
|
(`~/.local/share/opengamepadui/plugins`), or build it yourself:
|
||
|
|
|
||
|
|
```sh
|
||
|
|
make dist
|
||
|
|
```
|
||
|
|
|
||
|
|
Then restart OpenGamepadUI. The **Switch to Steam** button appears in the
|
||
|
|
power menu.
|
||
|
|
|
||
|
|
## How it works
|
||
|
|
|
||
|
|
- The plugin only activates when the OS session switcher
|
||
|
|
(`/usr/lib/os-session-select`) is present. On other systems the button is
|
||
|
|
never added.
|
||
|
|
- Pressing **Switch to Steam** runs
|
||
|
|
`os-session-select <return-session>`, where `<return-session>` is the value
|
||
|
|
ChimeraOS recorded in `~/.config/chimeraos-session-return` before
|
||
|
|
OpenGamepadUI took over (falling back to `gamescope-session-steam-plus`).
|
||
|
|
- Before switching, it runs `sudo -n systemctl restart inputplumber`.
|
||
|
|
ChimeraOS's default sudoers grants passwordless access to exactly this
|
||
|
|
command, so the switch stays non-interactive. If passwordless sudo for
|
||
|
|
`systemctl restart inputplumber` is not configured on your system, the
|
||
|
|
restart is skipped with a warning and the switch still proceeds.
|
||
|
|
|
||
|
|
## Compatibility
|
||
|
|
|
||
|
|
Tested with OpenGamepadUI v0.40.4 on ChimeraOS. The plugin pins to the
|
||
|
|
OpenGamepadUI tag it is built against (`OPENGAMEPAD_UI_TAG` in the Makefile)
|
||
|
|
so the compiled plugin bytecode always matches the running OpenGamepadUI
|
||
|
|
version.
|
||
|
|
|
||
|
|
## License
|
||
|
|
|
||
|
|
MIT
|