fade: Implement new mode "set".
[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 int typestr = "volume"
92 default = "60"
93 optional
94 details = "
95 Used as the start volume, before fading out to the
96 fade out volume.
97 "
98
99 option "fo-mood" -
100 #~~~~~~~~~~~~~~~~~
101 "afs mood/playlist during fade out"
102 string typestr = "mood_spec"
103 default = "m/fade"
104 optional
105 details = "
106 Select this mood right after setting the
107 volume. Example: --fo-mood m/sleep
108 "
109
110 option "fo-time" -
111 #~~~~~~~~~~~~~~~~~
112 "fall asleep fade out time"
113 int typestr = "seconds"
114 default = "1800"
115 optional
116 details = "
117 No fading if set to 0.
118 "
119
120 option "fo-vol" -
121 #~~~~~~~~~~~~~~~~
122 "volume to fade out to"
123 int typestr = "volume"
124 default = "20"
125 optional
126
127 option "sleep-mood" -
128 #~~~~~~~~~~~~~~~~~~~~
129 "sleep time afs mood/playlist"
130 string typestr = "mood_spec"
131 default = "m/sleep"
132 optional
133 details = "
134 Select the given afs mood/playlist after the fade
135 out is complete. If unset, the \"stop\" command is
136 sent to para_server.
137 "
138
139 option "wake-hour" H
140 #~~~~~~~~~~~~~~~~~~~
141 "(0-23) (default: now + 9 hours)"
142 int typestr = "hour"
143 optional
144
145 option "wake-min" M
146 #~~~~~~~~~~~~~~~~~~
147 "(0-59)"
148 int typestr = "minutes"
149 default = "0"
150 optional
151
152 option "fi-mood" -
153 #~~~~~~~~~~~~~~~~~
154 "afs mood/playlist during fade in"
155 string typestr = "mood_spec"
156 default = "m/wake"
157 optional
158 details = "
159 Change to this afs mood/playlist on wake time.
160 "
161
162 option "fi-time" -
163 #~~~~~~~~~~~~~~~~~
164 "wake up fade in time"
165 int typestr="seconds"
166 default="1200"
167 optional
168 details = "
169 No fading in if set to 0.
170 "
171
172 option "fi-vol" -
173 #~~~~~~~~~~~~~~~~
174 "volume to fade to at wake time"
175 int typestr = "volume"
176 default = "80"
177 optional
178
179 section "Options for snooze mode"
180 #################################
181
182 option "so-time" -
183 #~~~~~~~~~~~~~~~~~
184 "snooze-out time"
185 int typestr = "seconds"
186 default = "30"
187 optional
188
189 option "so-vol" -
190 #~~~~~~~~~~~~~~~~
191 "volume to fade to before snooze"
192 int typestr = "volume"
193 default = "20"
194 optional
195
196 option "snooze-time" -
197 #~~~~~~~~~~~~~~~~~~~~~
198 "delay"
199 int typestr = "seconds"
200 default = "600"
201 optional
202
203 option "si-time" -
204 #~~~~~~~~~~~~~~~~~
205 "snooze-in time"
206 int typestr = "seconds"
207 default = "180"
208 optional
209
210 option "si-vol" -
211 #~~~~~~~~~~~~~~~~
212 "volume to fade to after snooze"
213 int typestr = "volume"
214 default = "80"
215 optional
216
217 section "Options for fade mode"
218 ###############################
219
220 option "fade-vol" f
221 #~~~~~~~~~~~~~~~~~~
222 "volume to fade to"
223 int typestr = "volume"
224 default = "50"
225 optional
226
227 option "fade-time" t
228 #~~~~~~~~~~~~~~~~~~~
229 "fading time"
230 int typestr = "seconds"
231 default = "5"
232 optional
233
234 section "Options for set mode"
235 ##############################
236
237 option "val" -
238 "value to set"
239 int typestr = "value"
240 default = "0"
241 optional
242
243 </qu>