refactor: remove client module and associated show command logic
Some checks failed
CI / test (push) Failing after 5m7s
CI / clippy (push) Failing after 4m59s
CI / fmt (push) Successful in 28s

This commit is contained in:
2026-03-15 23:49:31 +01:00
parent 12f1f541ae
commit 58d0739cea
3 changed files with 110 additions and 21 deletions

View File

@@ -1,10 +0,0 @@
use std::io::Write;
pub fn send_show() -> Result<(), Box<dyn std::error::Error>> {
let runtime_dir =
std::env::var("XDG_RUNTIME_DIR").unwrap_or_else(|_| "/run/user/1000".to_string());
let socket_path = format!("{runtime_dir}/k-launcher.sock");
let mut stream = std::os::unix::net::UnixStream::connect(&socket_path)?;
stream.write_all(b"show\n")?;
Ok(())
}

View File

@@ -1,5 +1,3 @@
mod client;
use std::sync::Arc;
use k_launcher_kernel::Kernel;
@@ -15,15 +13,6 @@ use plugin_files::FilesPlugin;
fn main() {
tracing_subscriber::fmt::init();
let args: Vec<String> = std::env::args().collect();
if args.get(1).map(|s| s.as_str()) == Some("show") {
if let Err(e) = client::send_show() {
eprintln!("error: failed to send show command: {e}");
std::process::exit(1);
}
return;
}
if let Err(e) = run_ui() {
eprintln!("error: UI: {e}");
std::process::exit(1);