1
0
Fork 0
forked from wry/wry

all: implement screen locking

This commit is contained in:
Julian Orth 2022-05-19 23:39:11 +02:00
parent 9db389835d
commit d42add4d18
24 changed files with 618 additions and 6 deletions

21
src/cli/unlock.rs Normal file
View 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;
}