D.1Status Bar

These tags override the player setting for the display of the status bar. They must be noted on
their own line (which will not be shown in the WPS).

D.2Hardware Capabilities

Tag

Description

%cc

Check for presence of a real time clock, returns “c” when used
unconditionally

%tp

Does this target have a radio?

%Tp

Indicates that the target has a touchscreen

With the above tags it is possible to find out about the presence of certain hardware and make
the theme adapt to it. This can be very useful for designing a theme that works on multiple
targets with differing hardware capabilities, e.g. targets that do and do not have a clock.
When used conditionally, the “true” branch is completely ignored if it does not
apply.

Example: %?cc<%cH:%cM|No clock detected>

D.3Information from the track tags

Tag

Description

%ia

Artist

%ic

Composer

%iA

Album Artist

%id

Album Name

%iG

Grouping

%ig

Genre Name

%in

Track Number

%it

Track Title

%iC

Comment

%iv

ID3 version (1.0, 1.1, 2.2, 2.3, 2.4, or empty if not an ID3 tag)

%iy

Year

%ik

Disc Number

Remember that this information is not always available, so use the conditionals to show
alternate information in preference to assuming.

These tags, when written with a capital “I” (e.g. %Ia or %Ic), show the information for the
next song to be played.

D.5Additional Fonts

D.6Misc Coloring Tags

width and height can be “−” to fill the viewport. If no color is specified the viewports
foreground color will be used. If two colors are specified it will do a gradient fill.

D.7Power Related Information

Tag

Description

%bl

Numeric battery level in percents. Can also be used in
a conditional: %?bl<-1|0|1|2|…|N>, where the value −1
is used when the battery level isn’t known (it usually
is). The value N is only used when the battery level
is exactly 100 percent. An image can also be used, the
proportion of the image shown corresponds to the battery
level: %bl(x,y,[width],[height],image.bmp)

%bv

The battery level in volts

%bt

Estimated battery time left

%bp

“p” if the charger is connected (only on targets that can charge
batteries)

%bc

“c” if the unit is currently charging the battery (only on
targets that have software charge control or monitoring)

%bs

Remaining time of the sleep timer (if it is set)

D.8Information about the file

Tag

Description

%fb

File Bitrate (in kbps)

%fc

File Codec (e.g. “MP3” or “FLAC”). This tag can also be used
in a conditional tag: %?fc<mp1|mp2|mp3|aiff|wav|ogg|flac|mpcsv7|a52|wavpack|alac|aac|shn|sid|adx|nsf|speex|spc|ape|wma|wmpapro|mod|sap|realaudiocook|realaudioaac|realaudioac3|realaudioatrac3|cmc|cm3|cmr|cms|dmc|dlt|mpt|mpd|rmt|tmc|tm8|tm2|omaatrac3|smaf|au|vox|wave64|tta|wmavoice|mpcsv8|aache|ay|gbs|hes|sgc|vgm|kss|unknown>. The codec
order is as shown above.

%ff

File Frequency (in Hz)

%fk

File Frequency (in kHz)

%fm

File Name

%fn

File Name (without extension)

%fp

File Path

%fs

File Size (in Kilobytes)

%fv

“(avg)” if variable bit rate or empty string if constant bit rate

%d(N)

N-th segment from the end of the file’s directory (N can be 1,
2, 3, …)

Example for the %d(N) commands: If the file is “/Rock/Kent/Isola/11 - 747.mp3”, %d(1) is
“Isola”, %d(2) is “Kent” and %d(3) is “Rock”.

These tags, when written with the first letter capitalized (e.g. %Fn or %D(2)), produce the
information for the next file to be played.

D.9Playlist/Song Info

Tag

Description

%pb

Progress Bar. This will replace the entire line with a
progress bar. You can set the position, width and height of
the progressbar (in pixels) and load a custom image for it:
%pb(x,y,[width],[height],image.bmp)

%px

Percentage played in song

%pc

Current time in song

%pe

Total number of playlist entries

%pm

Peak Meter. The entire line is used as volume peak meter.

%pL

Peak meter for the left channel. Can be used as a value, a
conditional tag or a bar tag.

%pR

Peak meter for the right channel. Can be used as a value, a
conditional tag or a bar tag.

%pn

Playlist name (without path or extension)

%pp

Playlist position

%pr

Remaining time in song

%ps

“s” if shuffle mode is enabled

%pt

Total track time

%pv

Current volume (in dB). Can also be used in a conditional:
%?pv<Mute|…|0 dB|Above 0 dB>Mute is 0% volume, …is the values between Mute and max,
0 dB is max volume, and Above 0 dB is amplified volume
This can also be used like %pb to provide a continuous scale:
%pv(x,y,[width],[height],image.bmp)

%pS

Track is starting. An optional number gives how many
seconds the tag remains true for after the start of
the track. The default is 10 seconds if no number is
specified. %?pS(7)<in the first 7 seconds of track|inthe rest of the track>

%pE

Track is ending. An optional number gives how many seconds
before the end of the track the tag becomes true. The default
is 10 seconds if no number is specified. %?pE(7)<in the last7 seconds of track|in the rest of the track>

%Sp

Current playback pitch

D.10Playlist Viewer

Tag

Description

%Vp(start,codeto render)

Display the playlist viewer in the current viewport.

‘start’ is the offset relative to the currently playing track for the playlist to display
from (0 the current track, 1 is the next track, etc.).

‘code to render’ is a line of skin code which will be displayed for each line in the
viewer. All text tags are supported (including conditionals and sublines)

The entire viewport will be used, so don’t expect other tags in the same viewport to work well.
Supported tags are %pp, all tags starting with %i, most tags starting with %f, %pt and
%s.

Example: %Vp(1,%pp - %it,%pp - %fn) – Display the playlist position, then either the track
title (from the tags) or the filename. The viewer will display as many tracks as will fit in the
viewport.

D.11Runtime Database

Tag

Description

%rp

Song playcount

%rr

Song rating (0-10). This tag can also be used in a conditional
tag: %?rr<0|1|2|3|4|5|6|7|8|9|10>

The tag can also be used as the switch in a conditional tag. For players without certain
capabilities (e.g. no FM radio) some values will never be returned.

Examples:

You are in the %?cs<Main menu|WPS|Recording screen|FM Radio screen>

%?if(%cs, =, 2)<This is the WPS>

D.18List Title (.sbs only)

Tag

Description

%Lt

Title text. Should be used in a conditional so that non-list
screens don’t show a title when they shouldn’t

%Li

Title icon. This uses the same order as custom icons (see
CustomIcons in the wiki) except that here 0 is “no icon”

This tag can be used to give custom formatting to list titles. Define a viewport with the font
and formatting desired, and then use %?Lt<%Lt> to display the title within the viewport.
If %Lt is present anywhere in the .sbs, then the %Vi viewport will not show the
title.

D.19Changing Volume

Tag

Description

%mv(t)

“v” if the volume is being changed

The tag produces the letter “v” while the volume is being changed and some amount of time
after that, i.e. after the volume button has been released. The optional parameter t specifies
that amount of time, in seconds. If it is not specified, 1 second is assumed.

The tag can be used as the switch in a conditional tag to display different things depending on
whether the volume is being changed. It can produce neat effects when used with conditional
viewports.

Example: %?mv(2.5)<Volume changing|%pv>

The example above will display the text “Volume changing” if the volume is being changed
and 2.5 seconds after the volume button has been released. After that, it will display the
volume value.

D.20Settings

Tag

Description

%St(<settingname>)

The value of the Rockbox setting with the specified name. See
section E for the list of the available settings.

D.21Images

Tag

Description

%X(filename.bmp)

Load and set a backdrop image for the WPS. This image must
be exactly the same size as your LCD.

%x(n,filename[,x,y])

Load and display an imagen: image ID for later referencing in %xdfilename: file name relative to /.rockbox/ and including
“.bmp”x: x coordinate (defaults to 0 if both x and y are not specified)y: y coordinate. (defaults to 0 if both x and y are not specified)

%xl(n,filename,[x,y],[nimages])

Preload an image for later display (useful for when your
images are displayed conditionally).n: image ID for later referencing in %xdfilename: file name relative to /.rockbox/ and including
“.bmp”If the filename is “__list_icons__” the list icon bitmap will
be used insteadx: x coordinate (defaults to 0 if both x and y are not specified)y: y coordinate. (defaults to 0 if both x and y are not specified)nimages: (optional) number of sub-images (tiled vertically, of
the same height) contained in the bitmap. Default is 1.

%xd(n[i][,tag][,offset])

Display a preloaded image. n: image ID as it was specified in
%x or %xli: (optional) number of the sub-image to display (a-z for 1-26
and A-Z for 27-52). (ignored when tag is used). Only useable
if the ID is a single letter. By default the first (i.e. top most)
sub-image will be used.tag: (optional) Another tag to calculate the subimage from
e.g %xd(A, %mh) would use the first subimage when %mh is on
and the second when it is offoffset: (optional) Add this number to the value from the tag
when chosing the subimage (may be negative)

%x9(n)

Display an image as a 9-patch bitmap covering the entire
viewport.9-patch images are bitmaps split into 9 segments where the
four corners are unscaled, the four middle sections are scaled
along one axis and the middle section is scaled on both axis.n: image ID

Examples:

1.

Load and display the image /.rockbox/bg.bmp with ID “a” at 37, 109:%x(a,bg.bmp,37,109)

2.

Load a bitmap strip containing 5 volume icon images (all the same size) with image
ID “M”, and then reference the individual sub-images in a conditional:%xl(M,volume.bmp,134,153,5)%?pv<%xd(Ma)|%xd(Mb)|%xd(Mc)|%xd(Md)|%xd(Me)>

Note:

The images must be in BMP format

The image tag must be on its own line

The ID is case sensitive

The size of the LCD screen for each player varies. See table below for appropriate
sizes of each device. The x and y coordinates must respect each of the player’s
limits.

D.22FM Radio

Tag

Description

%tt

Is the tuner tuned?

%tm

Scan or preset mode? Scan is “true”, preset is “false”.

%ts

Is the station in stereo?

%ta

Minimum frequency (region specific) in MHz.

%tb

Maximum frequency (region specific) in MHz.

%tf

Current frequency in MHz.

%Ti

Current preset id, i.e. 1-based number of the preset within the
presets list (usable in playlist viewer).

%Tn

Current preset name (usable in playlist viewer).

%Tf

Current preset frequency (usable in playlist viewer).

%Tc

Preset count, i.e. the number of stations in the current preset
list.

%tx

Is RDS available?

%ty

RDS name.

%tz

RDS text.

%tr

Signal strength (RSSI). Can be used in a conditional or as a
bar.

It is also possible to show “Radio Art” which can be used to display images associated with
presets. The tags are exactly the same as for album art, described above. Images
need to be placed in /.rockbox/fmpresets/, and must have the same name as
the preset. They need to be in either .bmp or .jpg format, and the radio must be
in preset mode and tuned to a preset (and not recording) in order for them to be
shown.

D.23Alignment and language direction

Tag

Description

%al

Align the text left

%aL

Align the text left, or to the right if RTL language is in use

%ac

Centre the text

%ar

Align the text right

%aR

Align the text right, or to the left if RTL language is in use

%ax

The next tag should follow the set language direction. When
prepended to a viewport declaration, the viewport will be
horizontally mirrored if the user language is set to a RTL
language. Currently the %Cl, %V and %Vl tags support this.

%Sr

Use as a conditional to define options for left to right, or right
to left languages. %?Sr<RTL|LTR>

All alignment tags may be present in one line, but they need to be in the order left – centre –
right. If the aligned texts overlap, they are merged.

Example: %ax%V(…)

D.24Conditional Tags

Tag

Description

%?xx<true|false>

If / Else: Evaluate for true or false case

%?xx<alt1|alt2|alt3|…|else>

Enumerations: Evaluate for first / second / third / …/ last
condition

%if(tag,operator,operand,[optioncount])

Allows very simple comparisons with other tags.tag: the tag to check against.operator: the comparison to perform – possible options are
=, !=, >, >=, <, <=operand: either a second tag, a number, or text.[option count]: optional parameter used to select which
parameter of a tag to use when the tag has multiple options,
e.g. %?pv<a|b|c|d>

%and(tag1,tag2, ...,tagN)

Logical “and” operator. Will be evaluate to true if all the tag
parameters are true.

%or(tag1,tag2, ...,tagN)

Logical “or” operator. Will be evaluate to true if any of the
tag parameters are true.

Examples of the %if tag:

%?if(%pv, >=, 0)<Clipping possible|Volume OK> will display “Clipping possible” if the
volume is higher than or equal to 0 dB, “Volume OK” if it is lower.

%?if(%ia, =, %Ia)<same artist> – this artist and the next artist are the same.

Note: When performing a comparison against a string tag such as %ia, only = and != work,
and the comparison is not case sensitive.

D.25Subline Tags

Tag

Description

%t(time)

Set the subline display cycle time (%t(5) or %t(3.4) formats)

;

Split items on a line into separate sublines

Allows grouping of several items (sublines) onto one line, with the display cycling round the
defined sublines. See section 13.2.4 for details.

D.26Time and Date

Tag

Description

%cd

Day of month from 01 to 31

%ce

Zero padded day of month from 1 to 31

%cf

A conditional for 12/24 hour format.%?cf<24 hour stuff|12 hour stuff>

%cH

Zero padded hour from 00 to 23 (24 hour format)

%ck

Hour from 0 to 23 (24 hour format)

%cI

Zero padded hour from 01 to 12 (am/pm format)

%cl

Hour from 1 to 12 (am/pm format)

%cm

Month from 01 to 12

%cM

Minutes

%cS

Seconds

%cy

2-digit year

%cY

4-digit year

%cP

Capital AM/PM

%cp

Lowercase am/pm

%ca

Weekday name

%cb

Month name

%cu

Day of week from 1 to 7, 1 is Monday

%cw

Day of week from 0 to 6, 0 is Sunday

D.27Text Translation

Tag

Description

%Sx(English)

Display the translation of “English” in the current language

“English” must be a phrase used in the language file.

It should match the Source: line in the language file.

Note: checkwps cannot verify that the string is correct, so please check on either the
simulator or on target.

D.28Bar Tags

Some tags can be used to display a bar which draws according to the value of the tag. To use
these tags like a bar you need to use the following parameters (%XX should be replaced with
the actual tag).

Tag

Description

%XX(x, y,width,height,[options])

Draw the specified tag as a barx: x co-ordinate at which to start drawing the bar.y: y co-ordinate at which to start drawing the bar (- to make
the bar appear on the line of the tag, as if it was a text tag) .width: width of the bar (- for the full viewport width).height: height of the bar (- to set to the font height for
horizontal bars and to the viewport height for vertical bars).options: any of the options set out below.

D.28.1Options

image

– the next option is either the filename or image label to use for the fill image.

horizontal

– force the bar to be drawn horizontally.

vertical

– force the bar to be drawn vertically.

invert

– invert the draw direction (i.e. right to left, or top to bottom).

slider

– draw a preloaded image over the top of the bar so that the centre of the image
matches the current position. This must be followed by the label of the desired
image.

backdrop

– draw a preloaded image under the bar. The full image will be displayed and
must be the same size as the bar. This must be followed by the label of the desired
image.

nofill

– don’t draw the bar, only its frame (for use with the “slider” option).

noborder

– don’t draw the border for image-less bars, instead maximise the filling over
the specified area. This doesn’t work for bars which specify an image.

nobar

– don’t draw the bar or its frame (for use with the “slider” option).

setting

– Specify the setting name to draw the bar from (bar must be %St type), the
next param is the settings config name.

Example: %pb(0,0,-,-,-,nofill, slider, slider_image, invert) – draw a horizontal
progressbar which doesn’t fill and draws the image “slider_image” which moves right to
left.

Note: If the slider option is used, the bar will be shrunk so that the slider fits inside the
specified width and height. Example: A 100px bar image with a 16px slider image needs the
bar to be 116px wide, and should be offset 8px left of the backdrop image to align
correctly.

D.29Other Tags

Tag

Description

%ss(start,length, tag[,number]

Get a substring from another tag.

Use this tag to get a substring from another tag.

start

– first character to take (0 being the start of the string, negative means from the
end of the string)

length

– length of the substring to return (- for the rest of the string)

tag

– tag to get

number

– OPTIONAL. if this is present it will assume the substring is a number so it
can be used with conditionals. (i.e %cM). 0 is the first conditional option

Tag

Description

%(

The character ‘(’

%)

The character ‘)’

%,

The character ‘,’

%%

The character ‘%’

%<

The character ‘<’

%|

The character ‘|’

%>

The character ‘>’

%;

The character ‘;’

%#

The character ‘#’

%s

Indicate that the line should scroll. Can occur anywhere in a
line (given that the text is displayed; see conditionals above).
You can specify up to ten scrolling lines. Scrolling lines can
not contain dynamic content such as timers, peak meters or
progress bars.