2 \chapter{\label{ref:wps_tags
}WPS Tags
}
6 \config{\%we
} & Display Status Bar\\
7 \config{\%wd
} & Hide Status Bar\\
10 These tags override the player setting for the display of the status bar.
11 They must be noted on their own line (which will not be shown in the WPS).
13 \section{Information from the track tags
}
16 \config{\%ia
} & Artist\\
17 \config{\%ic
} & Composer\\
18 \config{\%id
} & Album Name\\
19 \config{\%ig
} & Genre Name\\
20 \config{\%in
} & Track Number\\
21 \config{\%it
} & Track Title\\
22 \config{\%iv
} & ID3 version (
1.0,
1.1,
2.2,
2.3,
2.4, or empty if not an ID3 tag)\\
23 \config{\%iy
} & Year\\
26 Remember that this information is not always available, so use the
27 conditionals to show alternate information in preference to assuming.
29 These tags, when written with a capital ``I'' (e.g.
\config{\%Ia
} or
\config{\%Ic
}),
30 produce the information for the next song to be played.
32 \section{Power Related Information
}
35 \config{\%bl
} & Numeric battery level in percents\\
36 & Can also be used in a conditional:
37 \config{\%?bl
{\textless}-
1{\textbar}0{\textbar}1{\textbar}%
38 2{\textbar}\ldots{\textbar}N
{\textgreater}},
39 where the value $-
1$ is used when the battery level isn't
40 known (it usually is)\\
41 \config{\%bv
} & The battery level in volts\\
42 \config{\%bt
} & Estimated battery time left\\
43 \config{\%bp
} & ``p'' if the charger is connected (only on targets
44 that can charge batteries)\\
45 \config{\%bc
} & ``c'' if the unit is currently charging the battery (only on
46 targets that have software charge control or monitoring)\\
47 \config{\%bs
} & Remaining time of the sleep timer (if it is set)\\
51 \section{Information about the file
}
54 \config{\%fb
} & File Bitrate (in kbps)\\
55 \config{\%fc
} & File Codec (e.g. ``MP3'' or ``FLAC'').
%
56 This tag can also be used in a conditional tag,
%
57 \config{\%?fc
{\textless}mp1\-
{\textbar}mp2\-
{\textbar}mp3\-
%
58 {\textbar}aiff\-
{\textbar}wav\-
{\textbar}ogg\-
{\textbar}flac\-
%
59 {\textbar}mpc\-
{\textbar}a52\-
{\textbar}wavpack\-
{\textbar}alac\-
%
60 {\textbar}aac\-
{\textbar}shn\-
{\textbar}sid\-
{\textbar}adx\-
%
61 {\textbar}nsf\-
{\textbar}speex\-
{\textbar}spc\-
{\textbar}ape\-
%
62 {\textbar}wma\-
{\textbar}mod\-
{\textbar}sap
%
63 {\textbar}unknown
{\textgreater}}.\\
64 & The codec order is as follows: MP1, MP2, MP3, AIFF, WAV,
65 Ogg Vorbis (OGG), FLAC, MPC, AC3, WavPack (WV), ALAC, AAC,
66 Shorten (SHN), SID, ADX, NSF, Speex, SPC, APE, WMA, MOD, SAP.\\
67 \config{\%ff
} & File Frequency (in Hz)\\
68 \config{\%fm
} & File Name\\
69 \config{\%fn
} & File Name (without extension)\\
70 \config{\%fp
} & File Path\\
71 \config{\%fs
} & File Size (in Kilobytes)\\
72 \config{\%fv
} & ``(avg)'' if variable bit rate or empty string if constant bit rate\\
73 \config{\%d1
} & First directory from the end of the file path\\
74 \config{\%d2
} & Second directory from the end of the file path\\
75 \config{\%d3
} & Third directory from the end of the file path\\
78 Example for the
\config{\%dN
} commands: If the path is
79 ``/Rock/Kent/Isola/
11 -
747.mp3'',
\config{\%d1
} is ``Isola'',
80 \config{\%d2
} is ``Kent'' and
\config{\%d3
} is ``Rock''.
82 These tags, when written with the first letter capitalized (e.g.
\config{\%Fn
} or
\config{\%D2
}),
83 produce the information for the next file to be played.
85 \section{Playlist/Song Info
}
88 \config{\%pb
} & Progress Bar\\
90 & This will display a one character ``cup''
91 that empties as the time progresses.
}
93 & This will replace the entire line with a progress bar. \\
94 & You can set the height, position and width of the progressbar
%
95 (in pixels):
\config{\%pb
{\textbar}height
{\textbar}leftpos
%
96 {\textbar}rightpos
{\textbar}toppos
{\textbar}}} \\
98 \config{\%pf
} & Full-line progress bar \& time display\\
100 \config{\%px
} & Percentage Played In Song\\
101 \config{\%pc
} & Current Time In Song\\
102 \config{\%pe
} & Total Number of Playlist Entries\\
104 \config{\%pm
} & Peak Meter. The entire line is used as
%
105 volume peak meter.\\%
107 \config{\%pn
} & Playlist Name (without path or extension)\\
108 \config{\%pp
} & Playlist Position\\
109 \config{\%pr
} & Remaining Time In Song\\
110 \config{\%ps
} & ``s'' if shuffle mode is enabled\\
111 \config{\%pt
} & Total Track Time\\
112 \config{\%pv
} & Current volume (in dB). Can also be used in a conditional: \\
113 &
\config{\%?pv
{\textless}0{\textbar}1{\textbar}2{\textbar}\ldots%
114 {\textbar}N
{\textgreater}}\\
115 &
0 is used for mute, the last option is used for values greater than zero.\\
119 \section{Runtime Database
}
122 \config{\%rp
} & Song playcount\\
123 \config{\%rr
} & Song rating (
0-
10). This tag can also be used in a conditional tag:
%
124 \config{\%?rr
{\textless}0{\textbar}1{\textbar}2{\textbar}3{\textbar}%
125 4{\textbar}5{\textbar}6{\textbar}7{\textbar}8{\textbar}9{\textbar}%
131 \section{Sound (DSP) settings
}
134 \config{\%Sp
} & Current playback pitch \\
136 \config{\%xf
} & Crossfade setting, in the order: Off, Shuffle, Skip, Always\\
137 \config{\%rg
} & ReplayGain value in use (x.y dB). If used as a conditional,
138 Replaygain type in use:
\config{\%?rg
{\textless}Off
{\textbar}Track
%
139 {\textbar}Album
{\textbar}TrackShuffle
{\textbar}AlbumShuffle
%
140 {\textbar}No tag
{\textgreater}}\\
146 % this will not include the "remote hold switch" tag for targets lacking
147 % a main unit hold switch
149 \opt{remote_button_hold
}{
150 \section{Hold Switches
}
153 \config{\%mh
} & ``h'' if the main unit hold switch is on\\
154 \config{\%mr
} & ``r'' if the remote hold switch is on\\
158 \nopt{remote_button_hold
}{
159 \section{Hold Switch
}
162 \config{\%mh
} & ``h'' if the hold switch is on\\
168 \section{Virtual LED
}
171 \config{\%lh
} & ``h'' if the
\disk\ is accessed\\
175 \section{Repeat Mode
}
178 \config{\%mm
} & Repeat mode,
0-
4, in the order: Off, All, One, Shuffle
179 \opt{player,recorder,recorderv2fm
}{, A-B
}\\
182 Example:
\config{\%?mm
{\textless}Off
{\textbar}All
{\textbar}One
{\textbar}Shuffle
%
183 {\textbar}A-B
{\textgreater}}
185 \section{Playback Mode Tags
}
188 \config{\%mp
} & Play status,
0-
4, in the order: Stop, Play, Pause,
189 Fast Forward, Rewind\\
192 Example:
\config{\%?mp
{\textless}Stop
{\textbar}Play
{\textbar}Pause
{\textbar}%
193 Ffwd
{\textbar}Rew
{\textgreater}}
195 \section{Changing Volume
}
198 \config{\%mv
[t
]} & ``v'' if the volume is being changed\\
202 The tag produces the letter ``v'' while the volume is being changed and some
203 amount of time after that, i.e. after the volume button has been released. The
204 optional parameter
\config{t
} specifies that amount of time, in seconds. If it
205 is not specified,
1 second is assumed.
207 The tag can be used as the switch in a conditional tag to display different things
208 depending on whether the volume is being changed. It can produce neat effects
209 when used with conditional viewports.
211 Example:
\config{\%?mv2.5
{\textless}Volume changing
{\textbar}\%pv
{\textgreater}}
213 The example above will display the text ``Volume changing'' if the volume is
214 being changed and
2.5 secs after the volume button has been released. After
215 that, it will display the volume value.
220 \config{\%St
{\textbar}<setting name>
{\textbar}} & The value of the Rockbox
221 setting with the specified name. See
\reference{ref:config_file_options
}
222 for the list of the available settings.\\
228 \item As a simple tag:
\config{\%St
{\textbar}skip length
{\textbar}}
229 \item As a conditional:
\config{\%?St
{\textbar}eq enabled
{\textbar}{\textless}Eq is enabled
{\textbar}Eq is disabled
{\textgreater}}
238 \config{\%X
{\textbar}filename.bmp
{\textbar}}
239 & Load and set a backdrop image for the WPS.
240 This image must be exactly the same size as your LCD.\\
242 \config{\%P
{\textbar}filename.bmp
{\textbar}}
243 & Load a Progress Bar image for the WPS. Use
\config{\%pb
} tag to show the
245 \config{\%x
{\textbar}n
{\textbar}filename
{\textbar}x
{\textbar}y
{\textbar}}
246 & Load and display an image\\
247 &
\config{n
}: image ID (a-z and A-Z) for later referencing in
\config{\%xd
}\\
248 &
\config{filename
}: file name relative to
\fname{/.rockbox/
} and including ``.bmp''\\
249 &
\config{x
}: x coordinate\\
250 &
\config{y
}: y coordinate.\\
251 \config{\%xl
{\textbar}n
{\textbar}filename
{\textbar}x
{\textbar}y
{\textbar}[nimages
{\textbar}]}
252 & Preload an image for later display (useful for when your images are displayed conditionally)\\
253 &
\config{n
}: image ID (a-z and A-Z) for later referencing in
\config{\%xd
}\\
254 &
\config{filename
}: file name relative to
\fname{/.rockbox/
} and including ``.bmp''\\
255 &
\config{x
}: x coordinate\\
256 &
\config{y
}: y coordinate\\
257 &
\config{nimages
}: (optional) number of sub-images (tiled vertically, of the same height)
258 contained in the bitmap. Default is
1.\\
259 \config{\%xdn
[i
]} & Display a preloaded image\\
260 &
\config{n
}: image ID (a-z and A-Z) as it was specified in
\config{\%x
} or
\config{\%xl
}\\
261 &
\config{i
}: (optional) number of the sub-image to display (a-z for
1-
26 and A-Z for
27-
52).
262 By default the first (i.e. top most) sub-image will be used.\\
268 \item Load and display the image
\fname{/.rockbox/bg.bmp
} with ID ``a'' at
37,
109:\\
269 \config{\%x
{\textbar}a
{\textbar}bg.bmp
{\textbar}37{\textbar}109{\textbar}}
270 \item Load a bitmap strip containing
5 volume icon images (all the same size)
271 with image ID ``M'', and then reference the individual sub-images in a conditional:\\
272 \config{\%xl
{\textbar}M
{\textbar}volume.bmp
{\textbar}134{\textbar}153{\textbar}5{\textbar}}\\
273 \config{\%?pv<\%xdMa
{\textbar}\%xdMb
{\textbar}\%xdMc
{\textbar}\%xdMd
{\textbar}%
280 \item The images must be in BMP format
281 \item The image tag must be on its own line
282 \item The ID is case sensitive, giving
52 different ID's
283 \item The size of the LCD screen for each player varies. See table below
284 for appropriate sizes of each device. The x and y coordinates must
285 repect each of the players' limits.
294 \config{\%Cl
{\textbar}x
{\textbar}y
{\textbar}[[l
{\textbar}c
{\textbar}r
]maxwidth
]{\textbar}[[t
{\textbar}c
{\textbar}b
]maxheight
]{\textbar}}
295 & Define the settings for albumart\\
296 &
\config{x
}: x coordinate\\
297 &
\config{y
}: y coordinate\\
298 &
\config{maxwidth
}: Maximum height\\
299 &
\config{maxheight
}: Maximum width\\
300 \config{\%C
} & Display the album art as configured. This tag can also be used as a conditional.\\
304 The picture will be rescaled, preserving aspect ratio to fit the given
305 \config{maxwidth
} and
\config{maxheight
}. If the aspect ratio doesn't match the
306 configured values, the picture will be placed according to the flags to the
307 \config{maxwidth
} and
\config{maxheight
} parameters:
309 \item \config{maxwidth
}:
311 \item[\config{l
}.
] Align left
312 \item[\config{c
}.
] Align center (default)
313 \item[\config{r
}.
] Align right
315 \item \config{maxheight
}:
317 \item[\config{t
}.
] Align left
318 \item[\config{c
}.
] Align center (default)
319 \item[\config{b
}.
] Align right
325 \item Load albumart at position
20,
40 and display it without resizing:\\
326 \config{\%Cl
{\textbar}20{\textbar}40{\textbar}{\textbar}{\textbar}}
327 \item Load albumart at position
0,
20 and resize it to be at most
100x100
328 pixels. If the image isn't square, align it to the bottom-right
330 \config{\%CL
{\textbar}0{\textbar}20{\textbar}r100
{\textbar}b100
{\textbar}}
337 \config{\%al
} & Align the text left\\
338 \config{\%ac
} & Center the text\\
339 \config{\%ar
} & Align the text right\\
342 All alignment tags may be present in one line, but they need to be in the
343 order left -- center -- right. If the aligned texts overlap, they are merged.
345 \section{Conditional Tags
}
349 \config{\%?xx
{\textless}true
{\textbar}false
{\textgreater}}
350 & If / Else: Evaluate for true or false case \\
351 \config{\%?xx
{\textless}alt1
{\textbar}alt2
{\textbar}alt3
{\textbar}\dots{\textbar}else
{\textgreater}}
352 & Enumerations: Evaluate for first / second / third /
\dots / last condition \\
356 \section{Subline Tags
}
360 \config{\%t
{\textless}time
{\textgreater}}
361 & Set the subline display cycle time (\%t5 or \%t3.4 formats) \\
363 & Split items on a line into separate sublines \\
367 Allows grouping of several items (sublines) onto one line, with the
368 display cycling round the defined sublines. See
369 \reference{ref:AlternatingSublines
} for details.
372 \section{Time and Date
}
376 \config{\%cd
} & Day of month\\
377 \config{\%ce
} & Zero padded day of month\\
378 \config{\%cH
} & Zero padded hour from
00 to
23 (
24 hour format)\\
379 \config{\%ck
} & Hour from
0 to
23 (
24 hour format)\\
380 \config{\%cI
} & Zero padded hour from
12 to
12 (am/pm format)\\
381 \config{\%cl
} & Hour from
12 to
12 (am/pm format)\\
382 \config{\%cm
} & Month\\
383 \config{\%cM
} & Minutes\\
384 \config{\%cS
} & Seconds\\
385 \config{\%cy
} &
2-digit year\\
386 \config{\%cY
} &
4-digit year\\
387 \config{\%cP
} & Capital AM/PM\\
388 \config{\%cp
} & Lowercase am/pm\\
389 \config{\%ca
} & Weekday name\\
390 \config{\%cb
} & Month name\\
391 \config{\%cu
} & Day of week from
1 to
7,
1 is Monday\\
392 \config{\%cw
} & Day of week from
0 to
6,
0 is Sunday\\
394 \config{\%cc
} & Check for presence of the clock hardware\\
397 The \%cc tag returns ``c'' if the necessary hardware is present and can also be
398 used as a conditional. This can be very useful for designing a WPS that works on
399 multiple targets, some with and some without a clock. By using this tag as a
400 conditional it is possible to display current date and time on those targets that
402 \opt{rtc
}{ (like the
\playertype)
},
403 or alternate information on those that do not
404 \nopt{rtc
}{ (like the
\playertype)
}%
408 \config{\%?cc
{\textless}\%cH:\%cM
{\textbar}No clock detected
{\textgreater}}
414 \config{\%\%
} & The character `\%'\\
415 \config{\%
{\textless}} & The character `
{\textless}'\\
416 \config{\%
{\textbar}} & The character `
{\textbar}'\\
417 \config{\%
{\textgreater}} & The character `
{\textgreater}'\\
418 \config{\%;
} & The character `;'\\
419 \config{\%s
} & Indicate that the line should scroll. Can occur
420 anywhere in a line (given that the text is
421 displayed; see conditionals above). You can specify
422 up to ten scrolling lines. Scrolling lines can not
423 contain dynamic content such as timers, peak meters