1
0
Fork 0
forked from wry/wry

refactor: split cargo workspace

This commit is contained in:
kossLAN 2026-06-05 11:56:21 -04:00
parent 5db14936e7
commit 1c21bd1259
695 changed files with 32023 additions and 44964 deletions

23
src/cli/dpms.rs Normal file
View file

@ -0,0 +1,23 @@
use {
crate::{
cli::{DpmsArgs, DpmsState, GlobalArgs},
tools::tool_client::{ToolClient, with_tool_client},
wire::jay_compositor::SetDpms,
},
std::rc::Rc,
};
pub fn main(global: GlobalArgs, args: DpmsArgs) {
with_tool_client(global.log_level, |tc| async move {
run(tc, args).await;
});
}
async fn run(tc: Rc<ToolClient>, args: DpmsArgs) {
let comp = tc.jay_compositor().await;
tc.send(SetDpms {
self_id: comp,
active: (args.state == DpmsState::On) as u32,
});
tc.round_trip().await;
}