This patch is based on the original stale patch by Guido Cella @guidocella. It has been modified to apply cleanly to the latest v5.0 tag. Since the SLOC limit is now lifted, this core feature should be merged into dwl upstream.
Thanks to Dima Krasner @dimkr for the cherry-pick.
3YMXYMGTDDZA3CE6VAPHHGLB6NMI344UA3B2W27WWICLC23G272AC KOX33HSBQSBMBWTVHHNCWVXJFFUSP3NXKRHQNQSFEFUPQXSJUKIAC V27TVOIQEKBQ5YYJUV4F762WEDPB2XYPWDYZRCAR5B65F3NDFTKAC VCNLR5X75OAXVKPZQHF5RUZ7BONBUC6RPGO2NZEUD3FZ7TEVL66AC NLOBELMSKHUSKSMPZ2QSDVIOJRGWV7HNXNIKZ55TMUCH7DI73TAAC 7B74AT3BXYB7PVW4F6SGQNPMHOU5TEV5TZ54CG6VSQI46XSEKWXQC R5PTRDZ52GPVS3572NJBRZQEBU3YVNUV4KYO4ICNIWQ3UUIPAUMQC S7RXJJZG4IEIVLPHEWFT5M2T3SRRO5US5SYBPXSYSWJJLXAKNNPAC 2OFGKDENMMCWXNCF5LTIHA4ZZC2EL5ERWDYD6WQ2EDGS7LSUVMEQC DVIBBDIRHCREHHOHZNQ2L3JJTW6GRSUGBHDJD2OKUBHWIBJ5WJUQC EQRGODLKSVSPFSUZU7BV5ER72U4QS4ATSBKV544XXQVKKTOSC7EAC OVLCSHYEKV3OPPZ3GC7KEAMF7YOWHFWE5J6KYGE3OXWQAS62S4XAC 3ZTG6CX4LPFTAV4AKALPCMGUCEA3XDE3O4LVTCBAQJDTBYO5ABCAC ZPSXARCBIT2LZ4PLNMKXHIEEWG3XLVXXISIZDYNGFACDI5I256NQC <?xml version="1.0" encoding="UTF-8"?><protocol name="wlr_output_power_management_unstable_v1"><copyright>Copyright © 2019 Purism SPCPermission is hereby granted, free of charge, to any person obtaining acopy of this software and associated documentation files (the "Software"),to deal in the Software without restriction, including without limitationthe rights to use, copy, modify, merge, publish, distribute, sublicense,and/or sell copies of the Software, and to permit persons to whom theSoftware is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice (including the nextparagraph) shall be included in all copies or substantial portions of theSoftware.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALLTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHERDEALINGS IN THE SOFTWARE.</copyright><description summary="Control power management modes of outputs">This protocol allows clients to control power management modesof outputs that are currently part of the compositor space. Theintent is to allow special clients like desktop shells to powerdown outputs when the system is idle.To modify outputs not currently part of the compositor space seewlr-output-management.Warning! The protocol described in this file is experimental andbackward incompatible changes may be made. Backward compatible changesmay be added together with the corresponding interface version bump.Backward incompatible changes are done by bumping the version number inthe protocol and interface names and resetting the interface version.Once the protocol is to be declared stable, the 'z' prefix and theversion number in the protocol and interface names are removed and theinterface version number is reset.</description><interface name="zwlr_output_power_manager_v1" version="1"><description summary="manager to create per-output power management">This interface is a manager that allows creating per-output powermanagement mode controls.</description><request name="get_output_power"><description summary="get a power management for an output">Create a output power management mode control that can be used toadjust the power management mode for a given output.</description><arg name="id" type="new_id" interface="zwlr_output_power_v1"/><arg name="output" type="object" interface="wl_output"/></request><request name="destroy" type="destructor"><description summary="destroy the manager">All objects created by the manager will still remain valid, until theirappropriate destroy request has been called.</description></request></interface><interface name="zwlr_output_power_v1" version="1"><description summary="adjust power management mode for an output">This object offers requests to set the power management mode ofan output.</description><enum name="mode"><entry name="off" value="0"summary="Output is turned off."/><entry name="on" value="1"summary="Output is turned on, no power saving"/></enum><enum name="error"><entry name="invalid_mode" value="1" summary="inexistent power save mode"/></enum><request name="set_mode"><description summary="Set an outputs power save mode">Set an output's power save mode to the given mode. The mode changeis effective immediately. If the output does not support the givenmode a failed event is sent.</description><arg name="mode" type="uint" enum="mode" summary="the power save mode to set"/></request><event name="mode"><description summary="Report a power management mode change">Report the power management mode change of an output.The mode event is sent after an output changed its powermanagement mode. The reason can be a client using set_mode or thecompositor deciding to change an output's mode.This event is also sent immediately when the object is createdso the client is informed about the current power management mode.</description><arg name="mode" type="uint" enum="mode"summary="the output's new power management mode"/></event><event name="failed"><description summary="object no longer valid">This event indicates that the output power management mode controlis no longer valid. This can happen for a number of reasons,including:- The output doesn't support power management- Another client already has exclusive power management mode controlfor this output- The output disappearedUpon receiving this event, the client should destroy this object.</description></event><request name="destroy" type="destructor"><description summary="destroy this power management">Destroys the output power management mode control object.</description></request></interface></protocol>
dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h xdg-shell-protocol.h
dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h xdg-shell-protocol.h wlr-output-power-management-unstable-v1-protocol.h