-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
54 lines (33 loc) · 1.25 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
ABOUT
=====
This is python bindings to the DPMS X11 extension module for controlling
your monitor power savings state.
The DPMS interface lets you control the power level of your monitor
(On, Standby, Suspend, or Off). It is a simple interface that lets
you get/set timeouts of inactivity to enter these states or you can
force it to enter any of the states.
See example.py on how to use it. This file should be sufficient on how
to use it. It first shows how to query all the different settings and
then shows how to set them.
See also 'man xset' for a program that lets you modify the DPMS state
from the command line.
These are bindings to the DPMS X11 extension module and as such only
work from within an X11 session. They do not work from a console
outside of X11.
INSTALL
=======
Install libXext and python development packages installed. For
example, on RedHat/Fedora:
yum install libXext-devel python-devel
On Ubuntu:
apt-get install libxext6-dev python-dev
Then run:
python setup.py build
Then as root, run:
python setup.py install
That's it. Now run:
python example.py
to test it out. Also try the turnoff.py script:
python turnoff.py
It should turn off your monitor after a 1 second wait. Press any key
to wake it back up.