Chris noccy

noccylabs/linux-dpms (0.1.0)

Published 2026-02-19 20:29:24 +00:00 by noccy

Installation

{
	"repositories": [{
			"type": "composer",
			"url": ""
		}
	]
}
composer require noccylabs/linux-dpms:0.1.0

About 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
Composer
2026-02-19 20:29:24 +00:00
0
Christopher Vagnetoft
GPL-2.0-or-later
8.5 KiB
Assets (1)
Versions (2) View all
0.1.0.1 2026-02-20
0.1.0 2026-02-19