-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md for new --module option
- Loading branch information
1 parent
f2b36ba
commit ba7ff8e
Showing
1 changed file
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,41 @@ | ||
# blank_detector | ||
# Blank Detector Task Controller | ||
|
||
A tool to detect blank screen by DPMS and run commands only when the screen is blank. | ||
A tool for running commands only when the display is blank or locked. | ||
|
||
## Requirement | ||
|
||
- Linux | ||
- DPMS enabled X environment (Please check by 'xset q|grep DPMS') | ||
- Python 2.7 or 3.x | ||
- One of these for display status detector | ||
- DPMS enabled X environment (Please check by 'xset q|grep DPMS') | ||
- 'xscreensaver-command' for xscreensaver status | ||
|
||
## Usage | ||
|
||
``` | ||
$ ./blank_detector.py -h | ||
usage: blank_detector.py [-h] -d DISPLAY -c COMMAND [-l LOG] | ||
usage: blank_detector.py [-h] [-d DISPLAY] -c COMMAND | ||
[-m {DpmsDetector,XscreensaverDetector}] [-l LOG] | ||
optional arguments: | ||
-h, --help show this help message and exit | ||
-d DISPLAY, --display DISPLAY | ||
Specify display name in format ':0.0' | ||
For detecting display blank, specify target display | ||
name in format ':0.0' (default is taken from $DISPLAY) | ||
-c COMMAND, --command COMMAND | ||
Set a command to execute | ||
-m {DpmsDetector,XscreensaverDetector}, --module {DpmsDetector,XscreensaverDetector} | ||
Select detector module for display status (default: | ||
DpmsDetector) | ||
-l LOG, --log LOG Set log file path for logging | ||
``` | ||
|
||
## Example | ||
|
||
``` | ||
$ ./blank_detector.py -d ':0.0' -c 'command.sh arg1 arg2' -l /path/to/app.log | ||
$ ./blank_detector.py -d ':0.0' -c 'command.sh arg1 arg2' -m DpmsDetector -l /path/to/app.log | ||
``` | ||
|
||
``` | ||
$ ./blank_detector.py -d ':0.0' -c 'command.sh arg1 arg2' -m XscreensaverDetector -l /path/to/app.log | ||
``` |