Skip to content

Commit

Permalink
Update README.md for new --module option
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueSkyDetector committed May 6, 2018
1 parent f2b36ba commit ba7ff8e
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions README.md
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
```

0 comments on commit ba7ff8e

Please sign in to comment.