Same as xset dpms force off
, but for Wayland.
It requires zwlr_output_power_manager_v1 and org_kde_kwin_idle support from the Wayland compositer. wlroots supports this.
It turns off all monitors, and after a second, if there is any user activity, it turns them back on. Don't interrupt the process, or your monitor won't be turned on later!
Install the Rust toolchain and cargo build --release
to build and find the built binary under target/release
.