]> git.neil.brown.name Git - freerunner.git/blob - lock/alerts.doc
lock: various updates
[freerunner.git] / lock / alerts.doc
1
2 Alerts
3 ------
4
5 'lock' is the intermediary for alerts.
6
7 Alerts are registered by creating a file in /var/run/alert/NAME
8
9 Providing 'lock' is running, it reads /etc/alert/NAME and performs the
10 actions listed.  
11 These can be:
12
13   sound:/file/name
14   vibrate:duration,on,off
15   led:name,on,off
16   flash:
17
18 Alert sources are:
19
20  SMS - this requires a single alert, no repeats.
21        file should be removed when alert ends.
22  RING - This alert can be actively repeated by changing the file, and
23        can be aborted by removing file.
24
25  ALARM - once only, but can go for longer and get more annoying.
26
27  LOW-BATTERY - single quiet short
28
29 If the file still exists when the alert finishes we either
30  - replay the alert if the mtime has changed
31  - delete the file
32
33 Other than 'sound' everything has duration, on, off.  They are in millisecs
34 Duration defaults to the length of the sound, or 5 seconds if there is no sound
35 'on' defaults to 500
36 'off' defaults to the same as 'on'
37
38 names are:
39   everything in '/sys/class/leds'  (unique substring works)
40   display
41
42
43 When the screen is woken up, everything stops.
44 If an alert is issued while the screen is awake, it continues until
45 some input.
46
47 Different modes/personalities are selected by modes files created in
48 /var/lib/personality/XXX
49
50 When reading the actions for an alert we read
51   alert
52   alert.XXX  for each XXX
53   XXX        for each XXX
54
55 settings override, so if 'SILENT' contains 'sound:' then when SILENT mode
56 is in effect, no sound is made.
57
58 So 'alert' serves as a default if no personality setting has been made.
59
60 How does this allow for different tones depending on who the caller is?
61 Maybe the alert can be  NAME.GROUP so SMS.friends