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:
+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