Add config and service subcommands

config subcommand — show, path, edit ($EDITOR), and a non-interactive
set that takes --prefix / --compat-dir / --gameid. Lets users retarget
the Wine prefix without hand-editing TOML.

service subcommand — install / uninstall / status for a systemd --user
unit that autostarts the tray. install writes ~/.config/systemd/user/
battlenet-manager.service with ExecStart pointing at the current binary,
then daemon-reloads and enable --now's the unit. uninstall tears it back
down.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-04-16 17:25:48 -07:00
parent 8908c15974
commit f7738d215b
4 changed files with 231 additions and 11 deletions
+15 -10
View File
@@ -33,16 +33,21 @@ first launch.
## Usage
| Command | What it does |
| --------------------------------- | ------------------------------------------------------- |
| `battlenet-manager` | Start the tray daemon (default) |
| `battlenet-manager launch` | Launch Battle.net and return (for `.desktop` shortcuts) |
| `battlenet-manager kill` | SIGTERM → wait 3 s → SIGKILL on all Battle.net procs |
| `battlenet-manager diagnose` | Run environment health checks |
| `battlenet-manager update-proton` | Interactive GE-Proton picker |
| `update-proton --latest` | Install newest GE-Proton release |
| `update-proton --version X` | Install a specific tag (e.g. `GE-Proton10-34`) |
| `update-proton --list` | Show recent releases without installing |
| Command | What it does |
| --------------------------------- | -------------------------------------------------------- |
| `battlenet-manager` | Start the tray daemon (default) |
| `battlenet-manager launch` | Launch Battle.net and return (for `.desktop` shortcuts) |
| `battlenet-manager kill` | SIGTERM → wait 3 s → SIGKILL on all Battle.net procs |
| `battlenet-manager diagnose` | Run environment health checks |
| `battlenet-manager update-proton` | Interactive GE-Proton picker |
| `update-proton --latest` | Install newest GE-Proton release |
| `update-proton --version X` | Install a specific tag (e.g. `GE-Proton10-34`) |
| `update-proton --list` | Show recent releases without installing |
| `config show` / `config path` | Print current config or its path |
| `config edit` | Open config in `$EDITOR` |
| `config set --prefix PATH` | Change the Wine prefix (also `--compat-dir`, `--gameid`) |
| `service install` | Write + enable a `systemd --user` unit for autostart |
| `service uninstall` / `status` | Remove the unit / show its status |
## Config