Merge branch 't/ao_fixes'
[paraslash.git] / m4 / gengetopt / fade.m4
1 args "--conf-parser --no-handle-version --no-handle-help"
2
3 purpose "An alarm clock and volume-fader for OSS and ALSA"
4
5 include(header.m4)
6 define(CURRENT_PROGRAM,para_fade)
7 define(DEFAULT_CONFIG_FILE,~/.paraslash/fade.conf)
8 <qu>
9 section "General options"
10 #########################
11
12 </qu>
13 include(config_file.m4)
14 include(loglevel.m4)
15 <qu>
16 option "mode" o
17 #~~~~~~~~~~~~~~
18 "how to fade volume"
19         enum typestr = "mode"
20         values = "sleep", "fade", "set", "snooze"
21         default = "sleep"
22         optional
23         details="
24                 para_fade knows the following modes:
25
26                 sleep mode: Change to the initial volume and select
27                 the initial afs mood/playlist. Then fade out until
28                 the fade-out volume is reached. Switch to the
29                 sleep mood/playlist until wake time minus fade-in
30                 time. Finally switch to the wake mood/playlist and
31                 fade to the fade-in volume.
32
33                 fade: Fade the volume to the given value in the
34                 given time.
35
36                 set: Just set the value and exit.
37
38                 snooze: Fade out, sleep a bit and fade in.
39 "
40
41 option "mixer-api" a
42 #~~~~~~~~~~~~~~~~~~~
43 "choose the mixer API"
44         string typestr = "api"
45         optional
46         details = "
47                 ALSA is preferred over OSS if both APIs are supported
48                 and this option is not given. To see the supported
49                 mixer APIs, use this option with an invalid string
50                 as the mixer API, e.g. --mixer-api help.
51         "
52
53 option "mixer-device" m
54 #~~~~~~~~~~~~~~~~~~~~~~
55 "choose mixer device"
56         string typestr = "device"
57         optional
58         details = "
59                 The default device (used if this option is not given)
60                 depends on the selected mixer API. For ALSA, the
61                 default is 'hw:0' which corresponds to the first sound
62                 device. For OSS, '/dev/mixer' is used as the default.
63         "
64
65 option "mixer-channel" C
66 #~~~~~~~~~~~~~~~~~~~~~~~
67 "select the analog mixer channel"
68         string typestr = "channel"
69         optional
70         details = "
71                 For the ALSA mixer API, the possible values are
72                 determined at runtime depending on the hardware and
73                 can be printed by specifying an invalid mixer channel,
74                 for example --mixer-channel help. The default channel
75                 is 'Master'.
76
77                 For OSS the possible values are invariably 'volume',
78                 'bass', 'treble', 'synth', 'pcm', 'speaker', 'line',
79                 'mic', 'cd', 'imix', 'altpcm', 'reclev', 'igain',
80                 'ogain'. However, not all listed channels might be
81                 supported on any particular hardware. The default
82                 channel is 'volume'.
83         "
84
85 section "Options for sleep mode"
86 ################################
87
88 option "ivol" -
89 #~~~~~~~~~~~~~~
90 "set initial volume"
91         string typestr = "[channel:]volume"
92         default = "60"
93         optional
94         multiple
95         details = "
96                 Used as the start volume, before fading out to the
97                 fade out volume. The channel part may be omitted, in
98                 which case the default channel is used. This option
99                 may be given multiple times.
100         "
101
102 option "fo-mood" -
103 #~~~~~~~~~~~~~~~~~
104 "afs mood/playlist during fade out"
105         string typestr = "mood_spec"
106         default = "m/fade"
107         optional
108         details = "
109                 Select this mood right after setting the
110                 volume. Example: --fo-mood m/sleep
111 "
112
113 option "fo-time" -
114 #~~~~~~~~~~~~~~~~~
115 "fall asleep fade out time"
116         int typestr = "seconds"
117         default = "1800"
118         optional
119         details = "
120                 No fading if set to 0.
121         "
122
123 option "fo-vol" -
124 #~~~~~~~~~~~~~~~~
125 "volume to fade out to"
126         int typestr = "volume"
127         default = "20"
128         optional
129
130 option "sleep-mood" -
131 #~~~~~~~~~~~~~~~~~~~~
132 "sleep time afs mood/playlist"
133         string typestr = "mood_spec"
134         default = "m/sleep"
135         optional
136         details = "
137                 Select the given afs mood/playlist after the fade
138                 out is complete. If unset, the \"stop\" command is
139                 sent to para_server.
140         "
141
142 option "wake-hour" H
143 #~~~~~~~~~~~~~~~~~~~
144 "(0-23) (default: now + 9 hours)"
145         int typestr = "hour"
146         optional
147
148 option "wake-min" M
149 #~~~~~~~~~~~~~~~~~~
150 "(0-59)"
151         int typestr = "minutes"
152         default = "0"
153         optional
154
155 option "fi-mood" -
156 #~~~~~~~~~~~~~~~~~
157 "afs mood/playlist during fade in"
158         string typestr = "mood_spec"
159         default = "m/wake"
160         optional
161         details = "
162                 Change to this afs mood/playlist on wake time.
163         "
164
165 option "fi-time" -
166 #~~~~~~~~~~~~~~~~~
167 "wake up fade in time"
168         int typestr="seconds"
169         default="1200"
170         optional
171         details = "
172                 No fading in if set to 0.
173         "
174
175 option "fi-vol" -
176 #~~~~~~~~~~~~~~~~
177 "volume to fade to at wake time"
178         int typestr = "volume"
179         default = "80"
180         optional
181
182 section "Options for snooze mode"
183 #################################
184
185 option "so-time" -
186 #~~~~~~~~~~~~~~~~~
187 "snooze-out time"
188         int typestr = "seconds"
189         default = "30"
190         optional
191
192 option "so-vol" -
193 #~~~~~~~~~~~~~~~~
194 "volume to fade to before snooze"
195         int typestr = "volume"
196         default = "20"
197         optional
198
199 option "snooze-time" -
200 #~~~~~~~~~~~~~~~~~~~~~
201 "delay"
202         int typestr = "seconds"
203         default = "600"
204         optional
205
206 option "si-time" -
207 #~~~~~~~~~~~~~~~~~
208 "snooze-in time"
209         int typestr = "seconds"
210         default = "180"
211         optional
212
213 option "si-vol" -
214 #~~~~~~~~~~~~~~~~
215 "volume to fade to after snooze"
216         int typestr = "volume"
217         default = "80"
218         optional
219
220 section "Options for fade mode"
221 ###############################
222
223 option "fade-vol" f
224 #~~~~~~~~~~~~~~~~~~
225 "volume to fade to"
226         int typestr = "volume"
227         default = "50"
228         optional
229
230 option "fade-time" t
231 #~~~~~~~~~~~~~~~~~~~
232 "fading time"
233         int typestr = "seconds"
234         default = "5"
235         optional
236
237 section "Options for set mode"
238 ##############################
239
240 option "val" -
241 "value to set"
242         int typestr = "value"
243         default = "0"
244         optional
245
246 </qu>