all: implement screen locking
This commit is contained in:
parent
9db389835d
commit
d42add4d18
24 changed files with 618 additions and 6 deletions
21
src/cli/unlock.rs
Normal file
21
src/cli/unlock.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
use {
|
||||
crate::{cli::GlobalArgs, tools::tool_client::ToolClient, wire::jay_compositor::Unlock},
|
||||
std::rc::Rc,
|
||||
};
|
||||
|
||||
pub fn main(global: GlobalArgs) {
|
||||
let tc = ToolClient::new(global.log_level.into());
|
||||
let logger = Rc::new(Unlocker { tc: tc.clone() });
|
||||
tc.run(run(logger));
|
||||
}
|
||||
|
||||
struct Unlocker {
|
||||
tc: Rc<ToolClient>,
|
||||
}
|
||||
|
||||
async fn run(log: Rc<Unlocker>) {
|
||||
let tc = &log.tc;
|
||||
let comp = tc.jay_compositor().await;
|
||||
tc.send(Unlock { self_id: comp });
|
||||
tc.round_trip().await;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue