From 8b444eec3bc9f2ec8978f4ffe5f66b4d55484352 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Sat, 28 Mar 2026 12:39:37 +0100 Subject: [PATCH] refactor: rename daemon binary from owlry-core to owlryd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Binary: owlry-core → owlryd - Systemd: owlry-core.service → owlryd.service, owlry-core.socket → owlryd.socket - Client: systemctl start owlryd - AUR package name stays owlry-core (installs owlryd binary) --- README.md | 8 ++++---- aur/owlry-core/PKGBUILD | 6 +++--- crates/owlry-core/Cargo.toml | 2 +- crates/owlry-core/src/main.rs | 4 ++-- crates/owlry/src/client.rs | 8 ++++---- justfile | 8 ++++---- systemd/{owlry-core.service => owlryd.service} | 2 +- systemd/{owlry-core.socket => owlryd.socket} | 0 8 files changed, 19 insertions(+), 19 deletions(-) rename systemd/{owlry-core.service => owlryd.service} (89%) rename systemd/{owlry-core.socket => owlryd.socket} (100%) diff --git a/README.md b/README.md index 2cd865b..165dcc2 100644 --- a/README.md +++ b/README.md @@ -126,22 +126,22 @@ Add to your compositor config: ```bash # Hyprland (~/.config/hypr/hyprland.conf) -exec-once = owlry-core +exec-once = owlryd # Sway (~/.config/sway/config) -exec owlry-core +exec owlryd ``` **2. Systemd user service** ```bash -systemctl --user enable --now owlry-core.service +systemctl --user enable --now owlryd.service ``` **3. Socket activation (auto-start on first use)** ```bash -systemctl --user enable owlry-core.socket +systemctl --user enable owlryd.socket ``` The daemon starts automatically when the UI client first connects. No manual startup needed. diff --git a/aur/owlry-core/PKGBUILD b/aur/owlry-core/PKGBUILD index 8236112..46edc6a 100644 --- a/aur/owlry-core/PKGBUILD +++ b/aur/owlry-core/PKGBUILD @@ -33,9 +33,9 @@ check() { package() { cd "owlry" - install -Dm755 "target/release/owlry-core" "$pkgdir/usr/bin/owlry-core" - install -Dm644 "systemd/owlry-core.service" "$pkgdir/usr/lib/systemd/user/owlry-core.service" - install -Dm644 "systemd/owlry-core.socket" "$pkgdir/usr/lib/systemd/user/owlry-core.socket" + install -Dm755 "target/release/owlryd" "$pkgdir/usr/bin/owlryd" + install -Dm644 "systemd/owlryd.service" "$pkgdir/usr/lib/systemd/user/owlryd.service" + install -Dm644 "systemd/owlryd.socket" "$pkgdir/usr/lib/systemd/user/owlryd.socket" install -dm755 "$pkgdir/usr/lib/owlry/plugins" install -dm755 "$pkgdir/usr/lib/owlry/runtimes" } diff --git a/crates/owlry-core/Cargo.toml b/crates/owlry-core/Cargo.toml index e28b79a..0f51bae 100644 --- a/crates/owlry-core/Cargo.toml +++ b/crates/owlry-core/Cargo.toml @@ -12,7 +12,7 @@ name = "owlry_core" path = "src/lib.rs" [[bin]] -name = "owlry-core" +name = "owlryd" path = "src/main.rs" [dependencies] diff --git a/crates/owlry-core/src/main.rs b/crates/owlry-core/src/main.rs index e18cc5b..4e40bad 100644 --- a/crates/owlry-core/src/main.rs +++ b/crates/owlry-core/src/main.rs @@ -7,7 +7,7 @@ fn main() { env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("warn")).init(); let sock = paths::socket_path(); - info!("Starting owlry-core daemon..."); + info!("Starting owlryd daemon..."); // Ensure the socket parent directory exists if let Err(e) = paths::ensure_parent_dir(&sock) { @@ -18,7 +18,7 @@ fn main() { let server = match Server::bind(&sock) { Ok(s) => s, Err(e) => { - eprintln!("Failed to start owlry-core: {e}"); + eprintln!("Failed to start owlryd: {e}"); std::process::exit(1); } }; diff --git a/crates/owlry/src/client.rs b/crates/owlry/src/client.rs index 0f05213..e754d7e 100644 --- a/crates/owlry/src/client.rs +++ b/crates/owlry/src/client.rs @@ -5,7 +5,7 @@ use std::time::Duration; use owlry_core::ipc::{ProviderDesc, Request, Response, ResultItem}; -/// IPC client that connects to the owlry-core daemon Unix socket +/// IPC client that connects to the owlryd daemon Unix socket /// and provides typed methods for all IPC operations. pub struct CoreClient { stream: UnixStream, @@ -38,15 +38,15 @@ impl CoreClient { // Socket not available — try to start the daemon. let status = std::process::Command::new("systemctl") - .args(["--user", "start", "owlry-core"]) + .args(["--user", "start", "owlryd"]) .status() .map_err(|e| { - io::Error::other(format!("failed to start owlry-core via systemd: {e}")) + io::Error::other(format!("failed to start owlryd via systemd: {e}")) })?; if !status.success() { return Err(io::Error::other(format!( - "systemctl --user start owlry-core exited with status {}", + "systemctl --user start owlryd exited with status {}", status ))); } diff --git a/justfile b/justfile index 43cc6a2..8211842 100644 --- a/justfile +++ b/justfile @@ -60,17 +60,17 @@ install-local: echo "Installing binaries..." sudo install -Dm755 target/release/owlry /usr/bin/owlry - sudo install -Dm755 target/release/owlry-core /usr/bin/owlry-core + sudo install -Dm755 target/release/owlryd /usr/bin/owlryd echo "Installing runtimes..." [ -f target/release/libowlry_lua.so ] && sudo install -Dm755 target/release/libowlry_lua.so /usr/lib/owlry/runtimes/liblua.so [ -f target/release/libowlry_rune.so ] && sudo install -Dm755 target/release/libowlry_rune.so /usr/lib/owlry/runtimes/librune.so echo "Installing systemd service files..." - [ -f systemd/owlry-core.service ] && sudo install -Dm644 systemd/owlry-core.service /usr/lib/systemd/user/owlry-core.service - [ -f systemd/owlry-core.socket ] && sudo install -Dm644 systemd/owlry-core.socket /usr/lib/systemd/user/owlry-core.socket + [ -f systemd/owlryd.service ] && sudo install -Dm644 systemd/owlryd.service /usr/lib/systemd/user/owlryd.service + [ -f systemd/owlryd.socket ] && sudo install -Dm644 systemd/owlryd.socket /usr/lib/systemd/user/owlryd.socket - echo "Done. Start daemon: systemctl --user enable --now owlry-core.service" + echo "Done. Start daemon: systemctl --user enable --now owlryd.service" # === Version Management === diff --git a/systemd/owlry-core.service b/systemd/owlryd.service similarity index 89% rename from systemd/owlry-core.service rename to systemd/owlryd.service index ce240de..8ff5a95 100644 --- a/systemd/owlry-core.service +++ b/systemd/owlryd.service @@ -5,7 +5,7 @@ After=graphical-session.target [Service] Type=simple -ExecStart=/usr/bin/owlry-core +ExecStart=/usr/bin/owlryd Restart=on-failure RestartSec=3 Environment=RUST_LOG=warn diff --git a/systemd/owlry-core.socket b/systemd/owlryd.socket similarity index 100% rename from systemd/owlry-core.socket rename to systemd/owlryd.socket