Rename project: battlenet-manager → umutray
Binary, crate, clap app name, ksni tray id, HTTP user-agent, systemd unit, XDG config dir (co.aleshym/umutray), README, and all log prefixes. Config path changes from ~/.config/battlenet-manager/ to ~/.config/umutray/. Existing users should `mv` the old directory if they've customised it; otherwise defaults get rewritten on next run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Generated
+14
-14
@@ -90,20 +90,6 @@ version = "0.22.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
||||
|
||||
[[package]]
|
||||
name = "battlenet-manager"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap 4.6.1",
|
||||
"directories",
|
||||
"ksni",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
@@ -1530,6 +1516,20 @@ version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
||||
|
||||
[[package]]
|
||||
name = "umutray"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap 4.6.1",
|
||||
"directories",
|
||||
"ksni",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.24"
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "battlenet-manager"
|
||||
name = "umutray"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Battle.net launcher manager for Linux via umu/Proton-GE"
|
||||
|
||||
[[bin]]
|
||||
name = "battlenet-manager"
|
||||
name = "umutray"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# battlenet-manager
|
||||
# umutray
|
||||
|
||||
A small system-tray daemon and CLI for running the Battle.net launcher on
|
||||
Linux via [umu-launcher](https://github.com/Open-Wine-Components/umu-launcher)
|
||||
@@ -18,7 +18,7 @@ and [GE-Proton](https://github.com/GloriousEggroll/proton-ge-custom).
|
||||
|
||||
```sh
|
||||
cargo build --release
|
||||
install -Dm755 target/release/battlenet-manager ~/.local/bin/battlenet-manager
|
||||
install -Dm755 target/release/umutray ~/.local/bin/umutray
|
||||
```
|
||||
|
||||
Requires `umu-launcher` and `tar` on PATH. On Arch:
|
||||
@@ -33,25 +33,25 @@ 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 |
|
||||
| `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 |
|
||||
| Command | What it does |
|
||||
| ------------------------------ | -------------------------------------------------------- |
|
||||
| `umutray` | Start the tray daemon (default) |
|
||||
| `umutray launch` | Launch Battle.net and return (for `.desktop` shortcuts) |
|
||||
| `umutray kill` | SIGTERM → wait 3 s → SIGKILL on all Battle.net procs |
|
||||
| `umutray diagnose` | Run environment health checks |
|
||||
| `umutray 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
|
||||
|
||||
Lives at `~/.config/battlenet-manager/config.toml`, written with defaults on
|
||||
Lives at `~/.config/umutray/config.toml`, written with defaults on
|
||||
first run:
|
||||
|
||||
```toml
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ fn home_dir() -> PathBuf {
|
||||
|
||||
impl Config {
|
||||
pub fn config_path() -> Result<PathBuf> {
|
||||
let dirs = ProjectDirs::from("co.aleshym", "", "battlenet-manager")
|
||||
let dirs = ProjectDirs::from("co.aleshym", "", "umutray")
|
||||
.context("Could not determine config directory")?;
|
||||
Ok(dirs.config_dir().join("config.toml"))
|
||||
}
|
||||
|
||||
+2
-2
@@ -58,7 +58,7 @@ pub fn run(config: &Config) {
|
||||
if age > 300 {
|
||||
checks.push(Check::fail(
|
||||
"agent.lock",
|
||||
format!("stale lock ({age}s old) — may cause BLZBNTBNA00000005; run: battlenet-manager kill"),
|
||||
format!("stale lock ({age}s old) — may cause BLZBNTBNA00000005; run: umutray kill"),
|
||||
));
|
||||
issues += 1;
|
||||
} else {
|
||||
@@ -108,7 +108,7 @@ pub fn run(config: &Config) {
|
||||
checks.push(Check::fail(
|
||||
"proton",
|
||||
format!(
|
||||
"{} not found — run: battlenet-manager update-proton --version={}",
|
||||
"{} not found — run: umutray update-proton --version={}",
|
||||
config.proton_version, config.proton_version
|
||||
),
|
||||
));
|
||||
|
||||
+3
-2
@@ -63,8 +63,9 @@ pub fn kill() -> Result<()> {
|
||||
|
||||
/// Returns true if any Battle.net process is currently running.
|
||||
pub fn is_running() -> bool {
|
||||
// Escape the dot — unescaped, "battle.net" also matches our own
|
||||
// "battlenet-manager" binary and reports a false positive.
|
||||
// Escape the dot — unescaped, "battle.net" would regex-match literally
|
||||
// any process with "battlenet" in its cmdline (including this binary if
|
||||
// it were ever renamed back to battlenet-*).
|
||||
std::process::Command::new("pgrep")
|
||||
.args(["-fi", "Battle\\.net"])
|
||||
.stdout(std::process::Stdio::null())
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ use std::path::PathBuf;
|
||||
/// Running without a subcommand starts the system tray daemon.
|
||||
/// Use `launch` in your .desktop shortcut for a direct, no-UI launch.
|
||||
#[derive(Parser)]
|
||||
#[command(name = "battlenet-manager", version, about)]
|
||||
#[command(name = "umutray", version, about)]
|
||||
struct Cli {
|
||||
#[command(subcommand)]
|
||||
command: Option<Commands>,
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ struct Asset {
|
||||
|
||||
fn http_client() -> Result<reqwest::blocking::Client> {
|
||||
reqwest::blocking::Client::builder()
|
||||
.user_agent("battlenet-manager/0.1")
|
||||
.user_agent("umutray/0.1")
|
||||
.build()
|
||||
.context("Failed to build HTTP client")
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ use anyhow::{bail, Context, Result};
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
|
||||
const UNIT_NAME: &str = "battlenet-manager.service";
|
||||
const UNIT_NAME: &str = "umutray.service";
|
||||
|
||||
fn unit_path() -> Result<PathBuf> {
|
||||
let home = std::env::var("HOME").context("$HOME is not set")?;
|
||||
|
||||
+3
-3
@@ -14,7 +14,7 @@ pub struct BattlenetTray {
|
||||
|
||||
impl ksni::Tray for BattlenetTray {
|
||||
fn id(&self) -> String {
|
||||
"battlenet-manager".into()
|
||||
"umutray".into()
|
||||
}
|
||||
|
||||
fn icon_name(&self) -> String {
|
||||
@@ -80,7 +80,7 @@ impl ksni::Tray for BattlenetTray {
|
||||
icon_name: "media-playback-start".into(),
|
||||
activate: Box::new(|this: &mut Self| {
|
||||
if let Err(e) = launcher::launch(&this.config) {
|
||||
eprintln!("battlenet-manager: launch failed: {e}");
|
||||
eprintln!("umutray: launch failed: {e}");
|
||||
}
|
||||
}),
|
||||
..Default::default()
|
||||
@@ -100,7 +100,7 @@ impl ksni::Tray for BattlenetTray {
|
||||
let config = this.config.clone();
|
||||
thread::spawn(move || {
|
||||
if let Err(e) = crate::proton::install_latest(&config) {
|
||||
eprintln!("battlenet-manager: proton update failed: {e}");
|
||||
eprintln!("umutray: proton update failed: {e}");
|
||||
}
|
||||
});
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user