rename to malarkey
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
fe74e7e6d0
commit
9b40e0dddf
20
Cargo.lock
generated
20
Cargo.lock
generated
@ -112,16 +112,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "larkinator"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"chrono",
|
|
||||||
"sysinfo",
|
|
||||||
"winreg",
|
|
||||||
"winrt-notification",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
@ -134,6 +124,16 @@ version = "0.2.94"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
|
checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "malarkey"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"chrono",
|
||||||
|
"sysinfo",
|
||||||
|
"winreg",
|
||||||
|
"winrt-notification",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memoffset"
|
name = "memoffset"
|
||||||
version = "0.6.3"
|
version = "0.6.3"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
authors = ["Sean Cross <sean@xobs.io>"]
|
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"
|
edition = "2018"
|
||||||
name = "larkinator"
|
name = "malarkey"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
@ -55,7 +55,6 @@ fn try_terminating(name: &str) -> Option<std::path::PathBuf> {
|
|||||||
|
|
||||||
// Now let's print every process' id and name:
|
// Now let's print every process' id and name:
|
||||||
for (pid, proc_) in system.get_processes() {
|
for (pid, proc_) in system.get_processes() {
|
||||||
// println!("{}:{} => status: {:?}", pid, proc_.name(), proc_.status());
|
|
||||||
if proc_.name() == name {
|
if proc_.name() == name {
|
||||||
println!("LARK FOUND!!! PID: {}, status: {:?}", pid, proc_.status());
|
println!("LARK FOUND!!! PID: {}, status: {:?}", pid, proc_.status());
|
||||||
println!("Original exe: {}", proc_.exe().display());
|
println!("Original exe: {}", proc_.exe().display());
|
||||||
@ -86,7 +85,7 @@ fn get_lark_path() -> Option<PathBuf> {
|
|||||||
use winreg::enums::*;
|
use winreg::enums::*;
|
||||||
use winreg::RegKey;
|
use winreg::RegKey;
|
||||||
let hkcu = RegKey::predef(HKEY_CURRENT_USER);
|
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),
|
Ok(v) => Some(v),
|
||||||
Err(_) => None,
|
Err(_) => None,
|
||||||
}?;
|
}?;
|
||||||
|
Loading…
Reference in New Issue
Block a user