I’ve been migrating my setup to Wayland the past few days, and I couldn’t figure out any way to turn off my displays without affecting the layout of the compositor (river).

As it turns out, there is a wlroots-specific protocol (wlr_output_power_manager_v1) for this purpose, but the only implementation I could find was a tool which doesn’t work exactly how I want and is based on Rust, a language I’m unfamiliar with (so I didn’t feel like modifying it).

Since I wanted to learn more about how Wayland works, and get more experience with C programming, I decided to build a new (super simple) tool, ‘wlr-dpms’.

Note that this tool only turns monitors on or off manually, it doesn’t implement any functionality to turn a monitor on when there is activity. You can use a resume command with ‘swayidle’ to implement this.

  • dsemy@lemm.eeOP
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 months ago

    Wow, I have no idea how I missed that, I literally read that page today.