Add per-game overlay toggles (gamemode, mangohud, gamescope)

Games live under each Launcher as a Vec<Game>; the launcher itself
never picks up overlays, only games launched through `play` do.

- config: Game struct with gamemode/mangohud/gamescope fields, plus
  add_game / remove_game / set_game_flags methods.
- launcher::play_game wraps the game command as
  `gamescope [args] -- gamemoderun umu-run <exe>` (each layer optional)
  and sets MANGOHUD=1 when enabled.
- CLI: `play`, `games`, `config add-game`, `config remove-game`,
  `config set-game-flags`.
- tray: per-game submenus with Play + checkmark toggles for GameMode /
  MangoHud / Gamescope; toggles persist to disk immediately.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-04-17 17:24:55 -07:00
parent 22fa1efabf
commit b72c642223
5 changed files with 515 additions and 3 deletions
+5
View File
@@ -58,6 +58,8 @@ umutray service install
| `umutray launchers` | List configured launchers and their state |
| `umutray launch <name>` | Launch a specific launcher (e.g. `umutray launch epic`) |
| `umutray kill [<name>]` | Kill one launcher, or all if no name is given |
| `umutray play <launcher> <game>` | Play a game with its configured overlays |
| `umutray games [<launcher>]` | List configured games and their overlay flags |
| `umutray diagnose [<name>]` | Health checks (one launcher or all) |
| `umutray setup <name>` | Open the graphical setup wizard for a launcher |
| `umutray update-proton --latest` | Install newest GE-Proton release |
@@ -68,6 +70,9 @@ umutray service install
| `umutray config set …` | Update globals (`--proton-version`, `--compat-dir`) |
| `umutray config add-launcher …` | Append a new launcher (needs `--exe-path`) |
| `umutray config remove-launcher` | Drop a launcher (prefix on disk is left untouched) |
| `umutray config add-game …` | Attach a game to a launcher (needs `--exe-path`) |
| `umutray config remove-game …` | Drop a game from a launcher |
| `umutray config set-game-flags …`| Per-game overlay toggles: gamemode/mangohud/gamescope |
| `umutray service install` | Write + enable a `systemd --user` unit |
| `umutray service uninstall` | Stop, disable, and remove the unit |
| `umutray service status` | `systemctl --user status umutray.service` |