20
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										20
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							@@ -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"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
[package]
 | 
			
		||||
authors = ["Sean Cross <sean@xobs.io>"]
 | 
			
		||||
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]
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,6 @@ fn try_terminating(name: &str) -> Option<std::path::PathBuf> {
 | 
			
		||||
 | 
			
		||||
    // 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<PathBuf> {
 | 
			
		||||
    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,
 | 
			
		||||
    }?;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user