Protoco...xt::DPMS(3)
πΈ NAME πΈ
X11::Protocol::Ext::DPMS β a Perl module for the X11 Protocol DPMS Extension π
okay so real talk, this little icon lives in the User Contributed Perl Documentation section of the manual, and honestly? she's giving "small but powerful." periodt β¨
π SYNOPSIS π
bestie, here's the whole vibe in three lines:
use X11::Protocol;
$x = X11::Protocol->new();
$x->init_extension('DPMS');
that's it. that's the ritual. load it up, make your X11::Protocol object, then init_extension('DPMS') and you're in. no cap π
π¦ DESCRIPTION π¦
so this module is literally here to control the DPMS features of compliant monitors β¨ like, the power-saving sleepy-time stuff your screen does. your monitor has to be "compliant" for this to work, which is the polite way of saying "it has to actually support DPMS, iykyk."
π«Ά SYMBOLIC CONSTANTS π«Ά
this extension adds the constant type DPMSPowerLevels, with values as defined in the standard. that's the whole tea β the actual values come straight from the standard, not from this module π
π₯ REQUESTS π₯
this extension adds several requests, and you call them exactly like this:
$x->DPMSGetVersion => ($major, $minor)
$x->DPMSCapable => ($capable)
$x->DPMSGetTimeouts => ($standby_timeout, $suspend_timeout, $off_timeout)
$x->DPMSSetTimeouts($standby_timeout, $suspend_timeout, $off_timeout) => ()
$x->DPMSEnable => ()
$x->DPMSDisable => ()
$x->DPMSForceLevel($power_level) => ()
$x->DPMSInfo => ($power_level,$state)
okay let's break the group chat down because these are all iconic in their own way:
$x->DPMSGetVersion => ($major, $minor)β grabs the version, hands you$majorand$minor. she's the intro slide π$x->DPMSCapable => ($capable)β asks the question we're all wondering: is this monitor actually DPMS-capable? you get$capableback. the vibe check of the whole extension, fr fr π$x->DPMSGetTimeouts => ($standby_timeout, $suspend_timeout, $off_timeout)β three timeouts, one call.$standby_timeout,$suspend_timeout,$off_timeout. the holy trinity of nap time π$x->DPMSSetTimeouts($standby_timeout, $suspend_timeout, $off_timeout) => ()β same three, but now you're the one setting them. note the=> ()β she returns nothing, she simply acts π$x->DPMSEnable => ()β turns the whole thing on. returns()because she doesn't owe you an explanation π$x->DPMSDisable => ()β turns it off. also returns(). main character energy either way β$x->DPMSForceLevel($power_level) => ()β forces a specific$power_level. no negotiating, no asking nicely. returns()π₯$x->DPMSInfo => ($power_level,$state)β tells you the current$power_leveland$state. the receipts request, honestly π
π AUTHOR π
Jay Kominek <jay.kominek@colorado.edu> β we stan a legend π«Ά
π SEE ALSO π
perl(1)X11::Protocol- X Display Power Management Signaling (DPMS) Extension (X Consortium Standard)
ngl if you got this far you're basically a DPMS expert now. go put your monitor to sleep responsibly π
perl v5.42.0 π¦ dated 2024-03-04 π¦ and that's the whole page, bestie β mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-X11-Protocol 0.56-160000.2.2 Β· GPL-1.0-or-later OR Artistic-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms