Block a user
noccylabs/linux-dpms (0.1.0.1)
Published 2026-02-20 13:53:12 +00:00 by noccy
Installation
{
"repositories": [{
"type": "composer",
"url": " "
}
]
}composer require noccylabs/linux-dpms:0.1.0.1About this package
Control the power state and settings of the screen
NoccyLabs Linux DPMS Wrapper
This is a library that wraps Linux DPMS settings into an easy-to-use class.
Installing
$ composer repositories add noccylabs composer \
https://dev.noccylabs.info/api/packages/noccylabs/composer
$ composer require noccylabs/dpms
Using
Set the power state
use NoccyLabs\Dpms\Display;
use NoccyLabs\Dpms\DisplayState;
$display = new Display(":0.0");
// Force the display on
$display->turnOn();
// For the display off
$display->turnOff();
// Or set your state manually
$display->setState(DisplayState::On);
$display->setState(DisplayState::Suspend);
Configure DPMS/Screen Saver timeouts
use NoccyLabs\Dpms\Display;
$display = new Display(":0.0");
// Enable or disable DPMS
$display->setDpmsState(true);
$display->setDpmsState(false);
// Configure the DPMStimeouts
$display->setDpmsTimeout($offSecs, $suspendSecs, $standbySecs);
// Configure screensaver timeouts
$display->setScreenSaverTimeout($timeoutSecs, $cycleSecs);
Details
2026-02-20 13:53:12 +00:00
Assets (1)
Versions (2)
View all
Composer
0
Christopher Vagnetoft
GPL-2.0-or-later
8.5 KiB
noccylabs-linux-dpms.0.1.0.1.zip
8.5 KiB