From 9b40e0dddfc10880a2b8ba3f5117a003deef21ca Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Mon, 17 May 2021 13:22:48 +0800 Subject: [PATCH] rename to `malarkey` Signed-off-by: Sean Cross --- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 4 ++-- src/main.rs | 3 +-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d0a6b0..01b21dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,16 +112,6 @@ dependencies = [ "libc", ] -[[package]] -name = "larkinator" -version = "0.1.0" -dependencies = [ - "chrono", - "sysinfo", - "winreg", - "winrt-notification", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -134,6 +124,16 @@ version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" +[[package]] +name = "malarkey" +version = "0.1.0" +dependencies = [ + "chrono", + "sysinfo", + "winreg", + "winrt-notification", +] + [[package]] name = "memoffset" version = "0.6.3" diff --git a/Cargo.toml b/Cargo.toml index 85fddeb..c089663 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] authors = ["Sean Cross "] -description = "Terminator for Lark when it's not office hours" +description = "Ensure that Lark is only active during business hours" edition = "2018" -name = "larkinator" +name = "malarkey" version = "0.1.0" [dependencies] diff --git a/src/main.rs b/src/main.rs index be45de8..2cb601a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,7 +55,6 @@ fn try_terminating(name: &str) -> Option { // Now let's print every process' id and name: for (pid, proc_) in system.get_processes() { - // println!("{}:{} => status: {:?}", pid, proc_.name(), proc_.status()); if proc_.name() == name { println!("LARK FOUND!!! PID: {}, status: {:?}", pid, proc_.status()); println!("Original exe: {}", proc_.exe().display()); @@ -86,7 +85,7 @@ fn get_lark_path() -> Option { use winreg::enums::*; use winreg::RegKey; let hkcu = RegKey::predef(HKEY_CURRENT_USER); - let lark_cfg = match hkcu.open_subkey("SOFTWARE\\Ion\\Larkinator") { + let lark_cfg = match hkcu.open_subkey("SOFTWARE\\Ion\\Malarkey") { Ok(v) => Some(v), Err(_) => None, }?;