blob: 9fd5e42e204fc4bcff502ae5810875ed0b91ff65 [file] [log] [blame]
Dominik Riebeling36a31332006-04-09 21:22:42 +00001% $Id$ %
Alex Parker40782d52010-05-13 08:13:31 +00002\chapter{\label{ref:wps_tags}Theme Tags}
3Themeing is discussed in detail in section \reference{ref:ConfiguringtheWPS},
4what follows is a list of the available tags.
5
Dominik Riebeling36a31332006-04-09 21:22:42 +00006\section{Status Bar}
Michael Chicoine65dc4f22010-03-23 12:02:20 +00007\begin{tagmap}
Alex Parker0c1f3e62010-03-21 10:20:19 +00008 \config{\%we} & Display Status Bar\\
9 \config{\%wd} & Hide Status Bar\\
10 \config{\%wi} & Display the inbuilt Status Bar in the current viewport\\
Dominik Riebeling36a31332006-04-09 21:22:42 +000011\end{tagmap}
12These tags override the player setting for the display of the status bar.
Alexander Levin0a241402009-03-23 21:46:49 +000013They must be noted on their own line (which will not be shown in the WPS).
Martin Arver94c12892006-03-23 14:11:52 +000014
Alexander Levin0a241402009-03-23 21:46:49 +000015\section{Information from the track tags}
Michael Chicoine65dc4f22010-03-23 12:02:20 +000016 \begin{tagmap}
Alexander Levin0a241402009-03-23 21:46:49 +000017 \config{\%ia} & Artist\\
18 \config{\%ic} & Composer\\
Tomer Shalev13ef6772010-01-08 14:03:43 +000019 \config{\%iA} & Album Artist\\
Alexander Levin0a241402009-03-23 21:46:49 +000020 \config{\%id} & Album Name\\
Tomer Shalev13ef6772010-01-08 14:03:43 +000021 \config{\%iG} & Grouping\\
Alexander Levin0a241402009-03-23 21:46:49 +000022 \config{\%ig} & Genre Name\\
23 \config{\%in} & Track Number\\
24 \config{\%it} & Track Title\\
Tomer Shalev13ef6772010-01-08 14:03:43 +000025 \config{\%iC} & Comment\\
Alexander Levin0a241402009-03-23 21:46:49 +000026 \config{\%iv} & ID3 version (1.0, 1.1, 2.2, 2.3, 2.4, or empty if not an ID3 tag)\\
27 \config{\%iy} & Year\\
Tomer Shalev13ef6772010-01-08 14:03:43 +000028 \config{\%ik} & Disc Number\\
Dominik Riebeling36a31332006-04-09 21:22:42 +000029 \end{tagmap}
30Remember that this information is not always available, so use the
31conditionals to show alternate information in preference to assuming.
Martin Arver94c12892006-03-23 14:11:52 +000032
Alexander Levin0a241402009-03-23 21:46:49 +000033These tags, when written with a capital ``I'' (e.g. \config{\%Ia} or \config{\%Ic}),
Alex Parkerab563da2009-09-20 16:48:45 +000034show the information for the next song to be played.
35
36\nopt{lcd_charcell}{
37 \section{Viewports}
Michael Chicoine65dc4f22010-03-23 12:02:20 +000038 \begin{tagmap}
39 \nopt{lcd_non-mono}{%
Alexander Levin67f25a42010-07-02 18:54:09 +000040 \config{\%V(x,y,[width],\tabnlindent[height],[font])}
Alexander Levin6d4637c2010-03-27 15:52:27 +000041 & See section \ref{ref:Viewports}\\}
Alex Parkerab563da2009-09-20 16:48:45 +000042
43 \nopt{lcd_color}{\opt{lcd_non-mono}{%
Alexander Levin67f25a42010-07-02 18:54:09 +000044 \config{\%V(x,y,[width],\tabnlindent[height],[font])}\newline
45 \config{\%Vf([fgshade])}\newline
46 \config{\%Vb([bgshade])}
Alexander Levin6d4637c2010-03-27 15:52:27 +000047 & See section \ref{ref:Viewports}\\}}
Alex Parkerab563da2009-09-20 16:48:45 +000048
49 \opt{lcd_color}{%
Alexander Levin67f25a42010-07-02 18:54:09 +000050 \config{\%V(x,y,[width],\tabnlindent[height],[font])}\newline
51 \config{\%Vf([fgcolour])}\newline
52 \config{\%Vb([bgcolour])}
Alexander Levin6d4637c2010-03-27 15:52:27 +000053 & See section \ref{ref:Viewports}\\}
Alex Parkerab563da2009-09-20 16:48:45 +000054
Alex Parker64d4ddf2010-06-20 12:58:41 +000055 \config{\%Vd('identifier')} & Display the `identifier' viewport. E.g.
Alexander Levin15d0ac02010-07-02 19:55:47 +000056 \config{\%?C<\%Vd(a)|\%Vd(b)>}
Alexander Levinac00d262010-03-26 22:12:39 +000057 will show viewport `a' if album art is found, and `b' if it isn't.\\
Alex Parker6d549df2010-05-13 08:13:37 +000058
Alex Parker49f2fce2010-06-20 16:27:41 +000059 \config{\%Vi('label',\dots)} &
Alexander Levin9f95a0b2010-05-13 08:41:01 +000060 Declare a Custom UI Viewport. The `\dots' parameters use the same logic as
Alex Parker6d549df2010-05-13 08:13:37 +000061 the \config{\%V} tag explained above. See section \ref{ref:Viewports}.\\
62
Alex Parker49f2fce2010-06-20 16:27:41 +000063 \config{\%VI('label')} & Set the Info Viewport to use the viewport called
Alex Parker6d549df2010-05-13 08:13:37 +000064 label, as declared with the previous tag.\\
Alex Parkerab563da2009-09-20 16:48:45 +000065 \end{tagmap}
Alex Parker1b0c77f2010-06-20 12:58:09 +000066
67 \section{Additional Fonts}
68 \begin{tagmap}
Alex Parker49f2fce2010-06-20 16:27:41 +000069 \config{\%Fl('id',filename)} & See section \ref{ref:multifont}.\\
Alex Parker1b0c77f2010-06-20 12:58:09 +000070 \end{tagmap}
71
Alex Parkerab563da2009-09-20 16:48:45 +000072}
Alexander Levin0a241402009-03-23 21:46:49 +000073
Dominik Riebeling36a31332006-04-09 21:22:42 +000074\section{Power Related Information}
Michael Chicoine65dc4f22010-03-23 12:02:20 +000075 \begin{tagmap}
Alexander Levin12427102010-07-02 19:32:48 +000076 \config{\%bl} & Numeric battery level in percents.
77 Can also be used in a conditional:
Alexander Levin15d0ac02010-07-02 19:55:47 +000078 \config{\%?bl<-1|0|1|2|\ldots|N>},
Alexander Levin0a241402009-03-23 21:46:49 +000079 where the value $-1$ is used when the battery level isn't
Alexander Levin12427102010-07-02 19:32:48 +000080 known (it usually is).
81 An image can also be used, the proportion of the image
Alex Parker64d4ddf2010-06-20 12:58:41 +000082 shown correspinds to the battery level:
83 \config{\%bl(x,y,[width],[height],image.bmp)}\\
Alexander Levin0a241402009-03-23 21:46:49 +000084 \config{\%bv} & The battery level in volts\\
85 \config{\%bt} & Estimated battery time left\\
86 \config{\%bp} & ``p'' if the charger is connected (only on targets
87 that can charge batteries)\\
88 \config{\%bc} & ``c'' if the unit is currently charging the battery (only on
89 targets that have software charge control or monitoring)\\
90 \config{\%bs} & Remaining time of the sleep timer (if it is set)\\
Dominik Riebeling36a31332006-04-09 21:22:42 +000091 \end{tagmap}
Martin Arver94c12892006-03-23 14:11:52 +000092
Alexander Levin0a241402009-03-23 21:46:49 +000093\section{Information about the file}
Michael Chicoine65dc4f22010-03-23 12:02:20 +000094 \begin{tagmap}
Martin Arverf21f9142006-05-08 21:32:44 +000095 \config{\%fb} & File Bitrate (in kbps)\\
Alexander Levin15d0ac02010-07-02 19:55:47 +000096 \config{\%fc} & File Codec (e.g. ``MP3'' or ``FLAC'').
97 This tag can also be used in a conditional tag:
98 \config{\%?fc<mp1|mp2|mp3|aiff|wav|ogg|\newline
99 flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|\newline
100 speex|spc|ape|wma|mod|sap|unknown>}.
Alexander Levin12427102010-07-02 19:32:48 +0000101 The codec order is as follows: MP1, MP2, MP3, AIFF, WAV,
Alexander Levin0a241402009-03-23 21:46:49 +0000102 Ogg Vorbis (OGG), FLAC, MPC, AC3, WavPack (WV), ALAC, AAC,
103 Shorten (SHN), SID, ADX, NSF, Speex, SPC, APE, WMA, MOD, SAP.\\
Martin Arverf21f9142006-05-08 21:32:44 +0000104 \config{\%ff} & File Frequency (in Hz)\\
Andree Buschmann53cf63f2010-04-14 19:44:07 +0000105 \config{\%fk} & File Frequency (in kHz)\\
Martin Arverf21f9142006-05-08 21:32:44 +0000106 \config{\%fm} & File Name\\
107 \config{\%fn} & File Name (without extension)\\
108 \config{\%fp} & File Path\\
Alexander Levin0a241402009-03-23 21:46:49 +0000109 \config{\%fs} & File Size (in Kilobytes)\\
110 \config{\%fv} & ``(avg)'' if variable bit rate or empty string if constant bit rate\\
Alexander Levina43fbbb2010-07-01 18:55:43 +0000111 \config{\%d(N)} & N-th segment from the end of the file's directory
112 (N can be 1, 2, 3, \dots)\\
Dominik Riebeling36a31332006-04-09 21:22:42 +0000113 \end{tagmap}
Alexander Levina43fbbb2010-07-01 18:55:43 +0000114Example for the \config{\%d(N)} commands: If the file is
Alex Parker64d4ddf2010-06-20 12:58:41 +0000115``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d(1)} is ``Isola'',
116\config{\%d(2)} is ``Kent'' and \config{\%d(3)} is ``Rock''.
Alexander Levin0a241402009-03-23 21:46:49 +0000117
Alex Parker64d4ddf2010-06-20 12:58:41 +0000118These tags, when written with the first letter capitalized (e.g. \config{\%Fn}
119or \config{\%D(2)}), produce the information for the next file to be played.
Martin Arver94c12892006-03-23 14:11:52 +0000120
Dominik Riebeling36a31332006-04-09 21:22:42 +0000121\section{Playlist/Song Info}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000122 \begin{tagmap}
Alexander Levin12427102010-07-02 19:32:48 +0000123 \config{\%pb} & Progress Bar.
Martin Arver94c12892006-03-23 14:11:52 +0000124 \opt{player}{
Alexander Levin12427102010-07-02 19:32:48 +0000125 This will display a one character ``cup''
Martin Arverec60a052006-03-29 18:40:42 +0000126 that empties as the time progresses.}
Nils Wallménius12eb0582008-03-23 22:07:09 +0000127 \opt{lcd_bitmap}{
Alexander Levin12427102010-07-02 19:32:48 +0000128 This will replace the entire line with a progress bar.
129 You can set the position, width and height of the progressbar
130 (in pixels) and load a custom image for it:
Alex Parker64d4ddf2010-06-20 12:58:41 +0000131 \config{\%pb(x,y,[width],[height],image.bmp)}} \\
Dominik Riebelingeef96942007-04-07 22:48:11 +0000132 \opt{player}{%
Martin Arverf21f9142006-05-08 21:32:44 +0000133 \config{\%pf} & Full-line progress bar \& time display\\
Dominik Riebelingeef96942007-04-07 22:48:11 +0000134 }%
Alexander Levind8f5f512010-07-02 18:57:57 +0000135 \config{\%px} & Percentage played in song\\
136 \config{\%pc} & Current time in song\\
137 \config{\%pe} & Total number of playlist entries\\
Dominik Riebelingeef96942007-04-07 22:48:11 +0000138 \nopt{player}{%
139 \config{\%pm} & Peak Meter. The entire line is used as %
140 volume peak meter.\\%
141 }%
Alexander Levind8f5f512010-07-02 18:57:57 +0000142 \config{\%pn} & Playlist name (without path or extension)\\
143 \config{\%pp} & Playlist position\\
144 \config{\%pr} & Remaining time in song\\
Alexander Levin0a241402009-03-23 21:46:49 +0000145 \config{\%ps} & ``s'' if shuffle mode is enabled\\
Alexander Levind8f5f512010-07-02 18:57:57 +0000146 \config{\%pt} & Total track time\\
Alexander Levin12427102010-07-02 19:32:48 +0000147 \config{\%pv} & Current volume (in dB). Can also be used in a conditional:
Alexander Levin15d0ac02010-07-02 19:55:47 +0000148 \config{\%?pv<0|1|2|\ldots|N>}\newline
Alexander Levin12427102010-07-02 19:32:48 +0000149 0 is used for mute, the last option is used for values greater than zero.
150 \opt{lcd_bitmap}{This can also be used like \%pb to provide a continuous scale:
Alex Parker64d4ddf2010-06-20 12:58:41 +0000151 \config{\%pv(x,y,[width],[height],image.bmp)}} \\
Alex Parkerbbb2dd52010-03-21 10:20:09 +0000152 \config{\%pS} & Track is starting. An optional number gives how many seconds
153 the tag remains true for after the start of the track. The default is
Alexander Levin12427102010-07-02 19:32:48 +0000154 10 seconds if no number is specified.
Alexander Levin15d0ac02010-07-02 19:55:47 +0000155 \config{\%pS(7)<in the first 7 seconds of track|in
156 the rest of the track>}\\
Alex Parkerbbb2dd52010-03-21 10:20:09 +0000157 \config{\%pE} & Track is ending. An optional number gives how many seconds
Alex Parker7e84cca2010-03-22 20:41:14 +0000158 before the end of the track the tag becomes true. The default is
Alexander Levin12427102010-07-02 19:32:48 +0000159 10 seconds if no number is specified.
Alexander Levin15d0ac02010-07-02 19:55:47 +0000160 \config{\%pE(7)<in the last 7 seconds of track|in
161 the rest of the track>}\\
Alexander Levin12427102010-07-02 19:32:48 +0000162 \config{\%Sp} & Current playback pitch\\
Dominik Riebeling36a31332006-04-09 21:22:42 +0000163 \end{tagmap}
Martin Arver94c12892006-03-23 14:11:52 +0000164
Dominik Riebeling36a31332006-04-09 21:22:42 +0000165\section{Runtime Database}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000166 \begin{tagmap}
Martin Arverf21f9142006-05-08 21:32:44 +0000167 \config{\%rp} & Song playcount\\
Alexander Levin0a241402009-03-23 21:46:49 +0000168 \config{\%rr} & Song rating (0-10). This tag can also be used in a conditional tag: %
Alexander Levin15d0ac02010-07-02 19:55:47 +0000169 \config{\%?rr<0|1|2|3|4|5|6|7|8|9|10>}\\
Tomer Shalev13ef6772010-01-08 14:03:43 +0000170 \config{\%ra} & Autoscore for the song\\
Dominik Riebeling36a31332006-04-09 21:22:42 +0000171 \end{tagmap}
Martin Arver94c12892006-03-23 14:11:52 +0000172
Nils Wallménius12eb0582008-03-23 22:07:09 +0000173\opt{swcodec}{
Dominik Riebeling9eaa5682006-04-10 17:35:49 +0000174\section{Sound (DSP) settings}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000175 \begin{tagmap}
Alexander Levin0a241402009-03-23 21:46:49 +0000176 \config{\%Sp} & Current playback pitch \\
Nils Wallménius12eb0582008-03-23 22:07:09 +0000177 \opt{swcodec}{
Jeffrey Goode0212de42009-11-11 17:38:00 +0000178 \config{\%xf} & Crossfade setting, in the order: Off, Auto Skip, Man Skip,
179 Shuffle, Shuffle and Man Skip, Always\\
Andree Buschmann1248e9c2010-04-14 20:38:21 +0000180 \config{\%rg} & ReplayGain value in use (x.y~dB). If used as a conditional,
Alexander Levin15d0ac02010-07-02 19:55:47 +0000181 Replaygain type in use: \config{\%?rg<Off|Track%
182 |Album|TrackShuffle|AlbumShuffle%
183 |No tag>}\\
Dominik Riebelingda1e28c2006-08-03 18:32:41 +0000184 }
Dominik Riebeling9eaa5682006-04-10 17:35:49 +0000185 \end{tagmap}
186}
Nils Wallméniusaf689872009-08-24 15:19:14 +0000187
Marianne Arnoldb013fb72010-07-01 21:02:12 +0000188\section{Hold}
189 \begin{tagmap}
190 \config{\%mh} & ``h'' if the main unit keys are locked\\
191 \opt{remote_button_hold}{%
192 \config{\%mr} & ``r'' if the remote keys are locked\\
193 }
194 \end{tagmap}
Martin Arver94c12892006-03-23 14:11:52 +0000195
Dominik Riebeling36a31332006-04-09 21:22:42 +0000196\section{Virtual LED}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000197 \begin{tagmap}
Marianne Arnolda352c622007-05-19 19:03:39 +0000198 \config{\%lh} & ``h'' if the \disk\ is accessed\\
Dominik Riebeling36a31332006-04-09 21:22:42 +0000199 \end{tagmap}
Martin Arver94c12892006-03-23 14:11:52 +0000200
Dominik Riebeling36a31332006-04-09 21:22:42 +0000201\section{Repeat Mode}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000202 \begin{tagmap}
Marianne Arnoldc9532a22010-04-04 13:58:52 +0000203 \config{\%mm} & Repeat mode, 0-4, in the order: Off, All, One, Shuffle, A-B\\
Dominik Riebeling36a31332006-04-09 21:22:42 +0000204 \end{tagmap}
Alexander Levin15d0ac02010-07-02 19:55:47 +0000205Example: \config{\%?mm<Off|All|One|Shuffle%
206|A-B>}
Martin Arver94c12892006-03-23 14:11:52 +0000207
Alexander Levin0bfef1c2010-02-26 19:57:51 +0000208\section{Playback Mode}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000209 \begin{tagmap}
Martin Arverf21f9142006-05-08 21:32:44 +0000210 \config{\%mp} & Play status, 0-4, in the order: Stop, Play, Pause,
Frank Gevaerts629bf3e2010-04-11 11:44:18 +0000211 Fast Forward, Rewind, Recording, Recording paused, FM Radio playing,
212 FM Radio muted\\
Dominik Riebeling36a31332006-04-09 21:22:42 +0000213 \end{tagmap}
Alexander Levin15d0ac02010-07-02 19:55:47 +0000214Example: \config{\%?mp<Stop|Play|Pause|%
215Ffwd|Rew|Rec|Rec pause|FM|%
216FM pause>}
Martin Arver94c12892006-03-23 14:11:52 +0000217
Alexander Levin5ff8a5a2010-02-26 19:53:06 +0000218\section{Current Screen}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000219 \begin{tagmap}
Thomas Martitzea4eadc2010-02-27 21:24:50 +0000220 \config{\%cs} & The current screen, 1-5, in the order:
221 Menus, WPS, Recording screen, FM Radio screen, Current Playlist screen\\
Alexander Levin5ff8a5a2010-02-26 19:53:06 +0000222 \end{tagmap}
Alexander Levin5ff8a5a2010-02-26 19:53:06 +0000223The tag can also be used as the switch in a conditional tag. For players without
224some capabilities (e.g. having no FM radio) some values will be never yielded.
225
Alexander Levin15d0ac02010-07-02 19:55:47 +0000226Example: \config{You are in the \%?cs<Main menu|WPS|%
227Recording screen|FM Radio screen>}
Alexander Levin5ff8a5a2010-02-26 19:53:06 +0000228
Alex Parker165709b2010-03-21 10:20:24 +0000229\section{List Title (\fname{.sbs} only)}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000230 \begin{tagmap}
Alex Parker165709b2010-03-21 10:20:24 +0000231 \config{\%Lt} & Title text. Should be used in a conditional so that non-list
232 screens don't show a title when they shouldn't\\
233 \config{\%Li} & Title icon. This uses the same order as custom icons (see
234 \wikilink{CustomIcons} in the wiki) except that here \config{0} is ``no
235 icon''\\
236 \end{tagmap}
237
238 This tag can be used to give custom formatting to list titles.
239 Define a viewport with the font and formatting desired, and then use
Alexander Levin15d0ac02010-07-02 19:55:47 +0000240 \config{\%?Lt<\%Lt>} to display the title within the
Alex Parker165709b2010-03-21 10:20:24 +0000241 viewport. If \config{\%Lt} is present anywhere in the \fname{.sbs}, then the
242 \config{\%Vi} viewport will not show the title.
243
Dominik Riebeling71c1e2a2008-10-12 10:48:06 +0000244\section{Changing Volume}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000245 \begin{tagmap}
Alex Parker64d4ddf2010-06-20 12:58:41 +0000246 \config{\%mv(t)} & ``v'' if the volume is being changed\\
Dominik Riebeling71c1e2a2008-10-12 10:48:06 +0000247 \end{tagmap}
Dominik Riebeling71c1e2a2008-10-12 10:48:06 +0000248
249The tag produces the letter ``v'' while the volume is being changed and some
250amount of time after that, i.e. after the volume button has been released. The
Alexander Levin0a241402009-03-23 21:46:49 +0000251optional parameter \config{t} specifies that amount of time, in seconds. If it
252is not specified, 1 second is assumed.
Dominik Riebeling71c1e2a2008-10-12 10:48:06 +0000253
254The tag can be used as the switch in a conditional tag to display different things
255depending on whether the volume is being changed. It can produce neat effects
256when used with conditional viewports.
257
Alexander Levin15d0ac02010-07-02 19:55:47 +0000258Example: \config{\%?mv(2.5)<Volume changing|\%pv>}
Dominik Riebeling71c1e2a2008-10-12 10:48:06 +0000259
260The example above will display the text ``Volume changing'' if the volume is
Andree Buschmann1248e9c2010-04-14 20:38:21 +0000261being changed and 2.5 seconds after the volume button has been released. After
Dominik Riebeling71c1e2a2008-10-12 10:48:06 +0000262that, it will display the volume value.
263
Antoine Cellerier8289b962008-12-07 16:20:35 +0000264\section{Settings}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000265 \begin{tagmap}
Alexander Levin67f25a42010-07-02 18:54:09 +0000266 \config{\%St(<setting\tabnlindent{}name>)} & The value of the Rockbox
Alexander Levin0a241402009-03-23 21:46:49 +0000267 setting with the specified name. See \reference{ref:config_file_options}
268 for the list of the available settings.\\
Antoine Cellerier8289b962008-12-07 16:20:35 +0000269 \end{tagmap}
Alexander Levin0a241402009-03-23 21:46:49 +0000270
271Examples:
272\begin{enumerate}
Alex Parker64d4ddf2010-06-20 12:58:41 +0000273\item As a simple tag: \config{\%St(skip length)}
Alexander Levin15d0ac02010-07-02 19:55:47 +0000274\item As a conditional: \config{\%?St(eq enabled)<Eq is enabled|Eq is disabled>}
Alexander Levin0a241402009-03-23 21:46:49 +0000275\end{enumerate}
276
Antoine Cellerier8289b962008-12-07 16:20:35 +0000277
Jonas Häggqvist410cbd12009-02-20 18:37:57 +0000278\opt{lcd_bitmap}{
Alex Parkerab563da2009-09-20 16:48:45 +0000279\section{\label{ref:wps_images}Images}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000280 \begin{tagmap}
Nils Wallméniusda555882006-11-13 15:14:28 +0000281 \nopt{archos}{%
Alex Parker64d4ddf2010-06-20 12:58:41 +0000282 \config{\%X(filename.bmp)}
Dominik Riebeling2ce440d2008-03-26 19:35:39 +0000283 & Load and set a backdrop image for the WPS.
Dominik Riebeling36a31332006-04-09 21:22:42 +0000284 This image must be exactly the same size as your LCD.\\
Nils Wallméniusda555882006-11-13 15:14:28 +0000285 }%
Alex Parker64d4ddf2010-06-20 12:58:41 +0000286 \config{\%x(n,filename,x,y)}
Alexander Levin12427102010-07-02 19:32:48 +0000287 & Load and display an image\newline
288 \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\newline
289 \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\newline
290 \config{x}: x coordinate\newline
291 \config{y}: y coordinate.\\
Alexander Levin67f25a42010-07-02 18:54:09 +0000292 \config{\%xl(n,filename,x,y,\tabnlindent[nimages])}
Alexander Levin12427102010-07-02 19:32:48 +0000293 & Preload an image for later display (useful for when your images are displayed conditionally).\newline
294 \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\newline
295 \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\newline
296 \config{x}: x coordinate\newline
297 \config{y}: y coordinate\newline
298 \config{nimages}: (optional) number of sub-images (tiled vertically, of the same height)
Dominik Riebeling2ce440d2008-03-26 19:35:39 +0000299 contained in the bitmap. Default is 1.\\
Alexander Levin12427102010-07-02 19:32:48 +0000300 \config{\%xd(n[i])} & Display a preloaded image.
301 \config{n}: image ID (a-z and A-Z) as it was specified in \config{\%x} or \config{\%xl}\newline
302 \config{i}: (optional) number of the sub-image to display (a-z for 1-26 and A-Z for 27-52).
Dominik Riebeling2ce440d2008-03-26 19:35:39 +0000303 By default the first (i.e. top most) sub-image will be used.\\
Dominik Riebeling36a31332006-04-09 21:22:42 +0000304 \end{tagmap}
Martin Arver94c12892006-03-23 14:11:52 +0000305
Dominik Riebeling8f44dd22008-03-28 21:49:41 +0000306Examples:
307\begin{enumerate}
308\item Load and display the image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109:\\
Alex Parker64d4ddf2010-06-20 12:58:41 +0000309\config{\%x(a,bg.bmp,37,109)}
Dominik Riebeling8f44dd22008-03-28 21:49:41 +0000310\item Load a bitmap strip containing 5 volume icon images (all the same size)
311with image ID ``M'', and then reference the individual sub-images in a conditional:\\
Alex Parker64d4ddf2010-06-20 12:58:41 +0000312\config{\%xl(M,volume.bmp,134,153,5)}\\
Alexander Levin15d0ac02010-07-02 19:55:47 +0000313\config{\%?pv<\%xd(Ma)|\%xd(Mb)|\%xd(Mc)|%
314\%xd(Md)|\%xd(Me)>}
Dominik Riebeling8f44dd22008-03-28 21:49:41 +0000315\end{enumerate}
Dominik Riebeling2ce440d2008-03-26 19:35:39 +0000316
317
Dominik Riebeling18f319c2006-04-01 17:00:04 +0000318\note{
319 \begin{itemize}
Alexander Levin3adb8212009-03-24 21:39:48 +0000320 \item The images must be in BMP format
Dominik Riebeling18f319c2006-04-01 17:00:04 +0000321 \item The image tag must be on its own line
322 \item The ID is case sensitive, giving 52 different ID's
323 \item The size of the LCD screen for each player varies. See table below
324 for appropriate sizes of each device. The x and y coordinates must
325 repect each of the players' limits.
326 \end{itemize}
327}
Jonas Häggqvist410cbd12009-02-20 18:37:57 +0000328}
329
330\opt{albumart}{
Alex Parker018133e2010-05-29 19:02:25 +0000331\section{\label{ref:album_art}Album Art}
332Rockbox allows you to put the album art, or another image related to the music
333on your \dap{} to display it in the PictureFlow plugin\opt{albumart}{ or in the
334theme}. For this feature to work, there are a few requirements.
335
336\subsection{Limitations}
337
338Rockbox does not support album art embedded in your files' tags, and will
339instead look for a picture located on disk. In addition to this, the
340pictures must be in either BMP or JPEG format. Rockbox does not support
341RLE-compressed BMP files, nor does it support progressive and multi-scan
342JPEG files. JPEG files must consist of a single scan with interleaved components,
343as progessive and multi-scan images require much more memory to decode.
344
345\subsection{Where to put album art}
346
347The pictures can be named a number of different ways, and placed to a number of
348different locations. You can have pictures specific to the file or the album
349or use a generic picture. You can place the picture in the same directory
350as the file, in the parent directory or in a fixed directory named
351\fname{/.rockbox/albumart/}. The order Rockbox uses when looking for a picture
352is as follows (a list in braces means that those file extensions are tried in
353that order):
354
355\begin{enumerate}
356\item \fname{./filename.\{jpeg,jpg,bmp\}}
357\item \fname{./albumtitle.\{jpeg,jpg,bmp\}}
358\item \fname{./cover.\{jpeg,jpg,bmp\}}
359\item \fname{./folder.jpg}
Jonas Häggqvist22b28752010-07-01 12:30:18 +0000360\item \fname{/.rockbox/albumart/albumartist-albumtitle.\{jpeg,jpg,bmp\}}
Alex Parker018133e2010-05-29 19:02:25 +0000361\item \fname{../albumtitle.\{jpeg,jpg,bmp\}}
362\item \fname{../cover.\{jpeg,jpg,bmp\}}
363\end{enumerate}
364
365The following characters will be replaced with an underscore (\_) when looking
Alexander Levin15d0ac02010-07-02 19:55:47 +0000366for albumtitle.bmp or albumartist-albumtitle.bmp: \textbackslash{} / : <
367> ? * |. Doublequotes will be replaced by single quotes.
Jonas Häggqvist22b28752010-07-01 12:30:18 +0000368If no album artist is set, artist will be used instead. See \wikilink{AlbumArt}
369in the wiki for programs that will help you automate the process of putting
370album art on your \dap{}.
Alex Parker018133e2010-05-29 19:02:25 +0000371
372\subsection{How to display the album art}
373
374Once the album art files are present on your \dap, they can be displayed as
375follows.
376
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000377 \begin{tagmap}
Alexander Levin67f25a42010-07-02 18:54:09 +0000378 \config{\%Cl(x,y,[maxwidth],\tabnlindent[maxheight],\tabnlindent{}hor\_align,\tabnlindent{}vert\_align)}
Alexander Levin12427102010-07-02 19:32:48 +0000379 & Define the settings for album art\newline
380 \config{x}: x coordinate\newline
381 \config{y}: y coordinate\newline
382 \config{maxwidth}: Maximum height\newline
383 \config{maxheight}: Maximum width\newline
384 \config{hor\_align}: Horizontal alignment, enter as `l', `c' or `r' for
385 left, centre or right. Centre is default\newline
386 \config{vert\_align}: Vertical alignment, enter as `t', `c' or `b' for
Alex Parker64d4ddf2010-06-20 12:58:41 +0000387 top, centre or bottom. Centre is default\\
Jonathan Gordon50356d82010-06-08 15:09:32 +0000388 \config{\%Cd} & Display the album art as configured. \\
Alex Parker64d4ddf2010-06-20 12:58:41 +0000389 \config{\%C} & Use in a conditional to determine if an image is available. \\
Jonas Häggqvist410cbd12009-02-20 18:37:57 +0000390 \end{tagmap}
Jonas Häggqvist410cbd12009-02-20 18:37:57 +0000391
392The picture will be rescaled, preserving aspect ratio to fit the given
393\config{maxwidth} and \config{maxheight}. If the aspect ratio doesn't match the
Alex Parker64d4ddf2010-06-20 12:58:41 +0000394configured values, the picture will be placed according to the alignment flags.
Jonas Häggqvist00215342009-02-20 19:08:18 +0000395
396Examples:
397\begin{enumerate}
398 \item Load albumart at position 20,40 and display it without resizing:\\
Alex Parker64d4ddf2010-06-20 12:58:41 +0000399 \config{\%Cl(20,40,,)}
Alexander Levin87b2ad142010-05-20 16:20:58 +0000400 \item Load albumart at position 0,20 and resize it to be at most 100$\times$100
Jonas Häggqvist00215342009-02-20 19:08:18 +0000401 pixels. If the image isn't square, align it to the bottom-right
402 corner:\\
Alex Parker64d4ddf2010-06-20 12:58:41 +0000403 \config{\%Cl(0,20,100,100,r,b)}
Jonas Häggqvist00215342009-02-20 19:08:18 +0000404\end{enumerate}
Jonas Häggqvist410cbd12009-02-20 18:37:57 +0000405}
Martin Arver94c12892006-03-23 14:11:52 +0000406
Alex Parkercaa68b52010-05-29 19:02:19 +0000407\opt{radio}{
Alex Parker0926e3e2010-05-13 08:13:42 +0000408\section{FM Radio}
409 \begin{tagmap}
Alexander Levin1940a0b2010-05-13 08:45:22 +0000410 \config{\%tp} & Does this target have a radio? If it doesn't, the ``true''
Alex Parker0926e3e2010-05-13 08:13:42 +0000411 branch of this conditional is completly ignored so you don't need to
412 worry about tags which are not recognized on non radio targets.\\
413 \config{\%tt} & Is the tuner tuned?\\
Alexander Levin1940a0b2010-05-13 08:45:22 +0000414 \config{\%tm} & Scan or preset mode? Scan is ``true'', preset is ``false''.\\
Alex Parker0926e3e2010-05-13 08:13:42 +0000415 \config{\%ts} & Is the station in stereo?\\
Alexander Levinedb6bed2010-05-15 21:47:30 +0000416 \config{\%ta} & Minimum frequency (region specific) in MHz.\\
417 \config{\%tb} & Maximum frequency (region specific) in MHz.\\
418 \config{\%tf} & Current frequency in MHz.\\
Alex Parker0926e3e2010-05-13 08:13:42 +0000419 \config{\%Ti} & Current preset id, i.e. 1-based number of the preset
420 within the presets list (usable in playlist viewer).\\
421 \config{\%Tn} & Current preset name (usable in playlist viewer).\\
422 \config{\%Tf} & Current preset frequency (usable in playlist viewer).\\
423 \config{\%Tc} & Preset count, i.e. the number of stations in the current
424 preset list.\\
425 \config{\%tx} & Is RDS available?\\
426 \config{\%ty} & RDS name.\\
427 \config{\%tz} & RDS text.\\
428 \end{tagmap}
429
Alex Parker4b360632010-05-29 19:02:10 +0000430It is also possible to show ``Radio Art'' which can be used to display images
431associated with presets. The tags are exactly the same as for album art,
432described above. Images need to be placed in \fname{/.rockbox/fmpresets/},
433and must have the same name as the preset. They need to be in either
434\fname{.bmp} or \fname{.jpg} format, and the radio must be in preset mode
435and tuned to a preset (and not recording) in order for them to be shown.
Alex Parkercaa68b52010-05-29 19:02:19 +0000436}
Alex Parker4b360632010-05-29 19:02:10 +0000437
Dominik Riebeling36a31332006-04-09 21:22:42 +0000438\section{Alignment}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000439 \begin{tagmap}
Alexander Levin0a241402009-03-23 21:46:49 +0000440 \config{\%al} & Align the text left\\
Tomer Shalev13ef6772010-01-08 14:03:43 +0000441 \config{\%aL} & Align the text left, or to the right if RTL language is in use\\
Alex Parkerc4b6c052009-11-22 11:24:49 +0000442 \config{\%ac} & Centre the text\\
Alexander Levin0a241402009-03-23 21:46:49 +0000443 \config{\%ar} & Align the text right\\
Tomer Shalev13ef6772010-01-08 14:03:43 +0000444 \config{\%aR} & Align the text right, or to the left if RTL language is in use\\
Dominik Riebeling36a31332006-04-09 21:22:42 +0000445 \end{tagmap}
446All alignment tags may be present in one line, but they need to be in the
Alex Parkerc4b6c052009-11-22 11:24:49 +0000447order left -- centre -- right. If the aligned texts overlap, they are merged.
Martin Arver94c12892006-03-23 14:11:52 +0000448
Dominik Riebeling36a31332006-04-09 21:22:42 +0000449\section{Conditional Tags}
Martin Arver94c12892006-03-23 14:11:52 +0000450
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000451\begin{tagmap}
Alexander Levin15d0ac02010-07-02 19:55:47 +0000452\config{\%?xx<true|false>}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000453 & If / Else: Evaluate for true or false case \\
Alexander Levin15d0ac02010-07-02 19:55:47 +0000454\config{\%?xx<alt1|alt2|\tabnlindent{}alt3|\dots|else>}
Dominik Riebeling36a31332006-04-09 21:22:42 +0000455 & Enumerations: Evaluate for first / second / third / \dots / last condition \\
456\end{tagmap}
Martin Arver94c12892006-03-23 14:11:52 +0000457
Alex Parkere56030a2009-05-15 21:17:21 +0000458\section{Subline Tags}
459
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000460\begin{tagmap}
Alexander Levin67f25a42010-07-02 18:54:09 +0000461\config{\%t(time)}
Alex Parker64d4ddf2010-06-20 12:58:41 +0000462 & Set the subline display cycle time (\%t(5) or \%t(3.4) formats) \\
Alex Parkere56030a2009-05-15 21:17:21 +0000463\config{;}
464 & Split items on a line into separate sublines \\
465\end{tagmap}
Alex Parkere56030a2009-05-15 21:17:21 +0000466
467Allows grouping of several items (sublines) onto one line, with the
468display cycling round the defined sublines. See
469\reference{ref:AlternatingSublines} for details.
470
Marianne Arnolde435e4d2009-05-16 11:22:41 +0000471
472\section{Time and Date}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000473 \begin{tagmap}
Marianne Arnolde435e4d2009-05-16 11:22:41 +0000474 \opt{rtc}{
Tomer Shalev13ef6772010-01-08 14:03:43 +0000475 \config{\%cd} & Day of month from 01 to 31\\
476 \config{\%ce} & Zero padded day of month from 1 to 31\\
Alexander Levin12427102010-07-02 19:32:48 +0000477 \config{\%cf} & A conditional for 12/24 hour format.\newline
478 \config{\%?cf<24 hour stuff|12 hour stuff>}\\
Alexander Levin0a241402009-03-23 21:46:49 +0000479 \config{\%cH} & Zero padded hour from 00 to 23 (24 hour format)\\
480 \config{\%ck} & Hour from 0 to 23 (24 hour format)\\
Tomer Shalev13ef6772010-01-08 14:03:43 +0000481 \config{\%cI} & Zero padded hour from 01 to 12 (am/pm format)\\
482 \config{\%cl} & Hour from 1 to 12 (am/pm format)\\
483 \config{\%cm} & Month from 01 to 12\\
Dominik Riebelingf177af42007-04-10 17:38:40 +0000484 \config{\%cM} & Minutes\\
485 \config{\%cS} & Seconds\\
Marianne Arnolde435e4d2009-05-16 11:22:41 +0000486 \config{\%cy} & 2-digit year\\
Dominik Riebelingf177af42007-04-10 17:38:40 +0000487 \config{\%cY} & 4-digit year\\
488 \config{\%cP} & Capital AM/PM\\
489 \config{\%cp} & Lowercase am/pm\\
490 \config{\%ca} & Weekday name\\
491 \config{\%cb} & Month name\\
492 \config{\%cu} & Day of week from 1 to 7, 1 is Monday\\
493 \config{\%cw} & Day of week from 0 to 6, 0 is Sunday\\
Marianne Arnolde435e4d2009-05-16 11:22:41 +0000494 }
495 \config{\%cc} & Check for presence of the clock hardware\\
Dominik Riebelingf177af42007-04-10 17:38:40 +0000496 \end{tagmap}
Marianne Arnolde435e4d2009-05-16 11:22:41 +0000497The \%cc tag returns ``c'' if the necessary hardware is present and can also be
498used as a conditional. This can be very useful for designing a WPS that works on
499multiple targets, some with and some without a clock. By using this tag as a
500conditional it is possible to display current date and time on those targets that
501support this
502\opt{rtc}{ (like the \playertype)},
503or alternate information on those that do not
504\nopt{rtc}{ (like the \playertype)}%
505.
506
507Example:
Alexander Levin15d0ac02010-07-02 19:55:47 +0000508\config{\%?cc<\%cH:\%cM|No clock detected>}
Marianne Arnolde435e4d2009-05-16 11:22:41 +0000509
Alex Parker55c8b2b2010-03-21 10:20:14 +0000510\section{Text Translation}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000511 \begin{tagmap}
Alex Parker64d4ddf2010-06-20 12:58:41 +0000512 \config{\%Sx(English)}
Alex Parker55c8b2b2010-03-21 10:20:14 +0000513 & Display the translation of ``English'' in the current language\\
514 \end{tagmap}
515
516 \begin{itemize}
517 \item ``English'' must be a phrase used in the language file.
518 \item It should match the \config{Source:} line in the language file.
519 \end{itemize}
520
521 \note{checkwps cannot verify that the string is correct, so please check on
522 either the simulator or on target.}
523
524
Alex Parkerf7a397b2010-02-28 11:50:11 +0000525\opt{touchscreen}{
526 \section{Touchscreen Areas (WPS only)}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000527 \begin{tagmap}
Alexander Levin67f25a42010-07-02 18:54:09 +0000528 \config{\%T(x,y,[width],\tabnlindent[height],action)}
Alexander Levin4c105b62010-03-07 22:12:16 +0000529 & Invoke the action specified when the user presses in the defined
530 touchscreen area.\\
531 \end{tagmap}
Alex Parkerf7a397b2010-02-28 11:50:11 +0000532 If the action starts with \& then the area must be held. Possible actions are:
533
534 \begin{description}
535 \item[play] -- Play/pause playback.
536 \item[stop] -- Stop playback and exit the WPS.
537 \item[prev] -- Previous track.
538 \item[next] -- Next track.
539 \item[ffwd] -- Seek forwards in the track.
540 \item[rwd] -- Seek backwards in the track.
541 \item[menu] -- Go to the main menu.
542 \item[browse] -- Go back to the file browser or database.
543 \item[shuffle] -- Toggle shuffle mode.
544 \item[repmode] -- Cycle through the repeat modes.
545 \item[quickscreen] -- Go to the quickscreen.
546 \item[contextmenu] -- Open the context menu.
547 \item[playlist] -- Go to the playlist viewer.
548 \item[progressbar] -- Seek to the appropriate position in the track based on the touch.
549 \item[volume] -- Set the volume to the appropriate level based on the touch.
550 \item[pitch] -- Open the pitchscreen.
551 \item[voldown] -- Decrease the volume by one step.
552 \item[volup] -- Increase the volume by one step.
553 \end{description}
554
555 \section{Last Touchscreen Press (WPS only)}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000556 \begin{tagmap}
Alexander Levin4c105b62010-03-07 22:12:16 +0000557 \config{\%Tl} & Indicates that the touchscreen is pressed.\\
558 \end{tagmap}
Alex Parkerf7a397b2010-02-28 11:50:11 +0000559 This tag can be used to display text or images or a viewport when the
560 touchscreen is pressed (like an On Screen Display). If you put a number
561 straight after \%Tl it will be used as a timeout in seconds
Alex Parker64d4ddf2010-06-20 12:58:41 +0000562 (e.g \%Tl(2.5) will give a 2.5 second timeout) between the touchscreen press
Alex Parkerf7a397b2010-02-28 11:50:11 +0000563 being released and the tag going false. If no number is specified it will
564 use a 1 second timeout. It can also be used as a conditional, and can be
565 used with conditional viewports.
566}
Dominik Riebelingf177af42007-04-10 17:38:40 +0000567
Dominik Riebeling36a31332006-04-09 21:22:42 +0000568\section{Other Tags}
Michael Chicoine65dc4f22010-03-23 12:02:20 +0000569\begin{tagmap}
Alex Parker64d4ddf2010-06-20 12:58:41 +0000570 \config{\%(} & The character `('\\
571 \config{\%)} & The character `)'\\
572 \config{\%,} & The character `,'\\
Alexander Levin0a241402009-03-23 21:46:49 +0000573 \config{\%\%} & The character `\%'\\
Alexander Levin15d0ac02010-07-02 19:55:47 +0000574 \config{\%<} & The character `<'\\
575 \config{\%|} & The character `|'\\
576 \config{\%>} & The character `>'\\
Alexander Levin0a241402009-03-23 21:46:49 +0000577 \config{\%;} & The character `;'\\
Alexander Levin15d0ac02010-07-02 19:55:47 +0000578 \config{\#} & The character `\#'\\
Martin Arverf21f9142006-05-08 21:32:44 +0000579 \config{\%s} & Indicate that the line should scroll. Can occur
580 anywhere in a line (given that the text is
581 displayed; see conditionals above). You can specify
Alexander Levin0a241402009-03-23 21:46:49 +0000582 up to ten scrolling lines. Scrolling lines can not
Martin Arverf21f9142006-05-08 21:32:44 +0000583 contain dynamic content such as timers, peak meters
584 or progress bars.\\
Dominik Riebeling36a31332006-04-09 21:22:42 +0000585\end{tagmap}
Alexander Levin4c105b62010-03-07 22:12:16 +0000586