Skip to content
This repository has been archived by the owner on Nov 28, 2017. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
johnchen902 committed Feb 3, 2017
1 parent b1a102f commit fa5ec67
Showing 1 changed file with 44 additions and 14 deletions.
58 changes: 44 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,68 @@
## Description

jautolock will fire a program after specified time of user inactivity.
It is intended to replace xautolock.
It has basically the same functionality as xautolock,
but is designed to be more flexible.
You can specify any number of tasks, instead of only three.
Smallest time unit is nanosecond, instead of second or minute.

## Development
## Build

jautolock has the following dependencies:
* confuse
* libxdg-basedir
* libxss
* libx11 (should be implied by libxss)

## Upstream

jautolock is developed at https://github.com/johnchen902/jautolock

## Compilation

Compiling is done with the usual make-line
To build, use the usual make command:
```bash
make && sudo make install
make
```

## Configuration
## Usage

Unlike xautolock, jautolock has no default locker.
You must tell jautolock what program to fire.

Put your config at ~/.config/jautolock/config

Sample config:
```
task notify {
time = 50
time = 50s
command = "notify-send jautolock \"10 seconds before locking\""
}
task lock {
time = 60
command = "i3lock -nc 000000"
time = 60s
command = "i3lock -n"
}
task screenoff {
time = 70s
command = "xset dpms force off"
}
```
Supported time units are d (days), h (hours), m (minutes),
s (seconds), ms (milliseconds) and ns (nanoseconds).

Once you have your configuration, run:
```bash
jautolock
```

Like xautolock, jautolock can communicate with an already running instance.
Use `jautolock <message>` to send message.
Currently these messages are understood:

+ `exit`: Exit.
+ `now <taskname>`: Fire task with the specified name.
+ `busy`: Assume the user is always active.
+ `unbusy`: No longer assume the user is always active.

## Timing

*Need help with this section.*

Take the sample config above as an example.
When task lock is running,
task screenoff will be fired after 10 seconds of inactivity instead of 70,
and task notify will not be automatically fired.

0 comments on commit fa5ec67

Please sign in to comment.