Themeing is discussed in detail in section section 13.2, what follows is a list of the available tags.
Note: The “bar-type tags” (such as %pb, %pv, %bl etc.) can be further themed – see section D.28.
Tag | Description |
%we | Display Status Bar |
%wd | Hide Status Bar |
%wi | Display the inbuilt Status Bar in the current viewport |
|
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).
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>
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.
Tag | Description |
%V(x,y,[width], | See section 13.2.2 |
%Vs(mode[,param]) | See section 13.2.2 |
%Vl(’identifier’, | Preloads a viewport for later display. ‘identifier’ is a single lowercase letter (a-z) and the ‘…’ parameters use the same logic as the %V tag explained above. |
%Vd(’identifier’) | Display the ‘identifier’ viewport. E.g. %?C<%Vd(a)|%Vd(b)> will show viewport ‘a’ if album art is found, and ‘b’ if it isn’t. |
%Vi(’label’,…) | Declare a Custom UI Viewport. The ‘…’ parameters use the same logic as the %V tag explained above. See section 13.2.2. |
%VI(’label’) | Set the Info Viewport to use the viewport called label, as declared with the previous tag. |
%VB | Draw this viewport on the backdrop layer. |
|
Tag | Description |
%Fl(’id’,filename) | See section 13.2.4. |
|
Tag | Description |
%dr(x,y,width,height,[color1,color2]) | Color a rectangle. |
|
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.
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) |
|
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| |
%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.
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> |
%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|in the 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 last 7 seconds of track|in the rest of the track> |
%Sp | Current playback pitch |
|
Tag | Description |
%Vp(start,code to render) | Display the playlist viewer in the current viewport. |
|
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.
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> |
%ra | Autoscore for the song |
|
Tag | Description |
%Sp | Current playback pitch |
%xf | Crossfade setting, in the order: Off, Auto Skip, Man Skip, Shuffle, Shuffle and Man Skip, Always |
%rg | ReplayGain value in use (x.y dB). If used as a conditional, Replaygain type in use: %?rg<Off|Track|Album|TrackShuffle|AlbumShuffle|No tag> |
|
Tag | Description |
%mh | “h” if the main unit keys are locked |
|
Tag | Description |
%lh | “h” if the hard disk is accessed |
|
Tag | Description |
%mm | Repeat mode, 0-4, in the order: Off, All, One, Shuffle, A-B |
|
Example: %?mm<Off|All|One|Shuffle|A-B>
Tag | Description |
%mp | Play status, 0-4, in the order: Stop, Play, Pause, Fast Forward, Rewind, Recording, Recording paused, FM Radio playing, FM Radio muted |
|
Example: %?mp<Stop|Play|Pause|Ffwd|Rew|Rec|Rec pause|FM|FM pause>
Tag | Description |
%cs | The current screen, 1-20, in the order shown below |
|
Number | Screen |
1 | Menus |
2 | WPS |
3 | Recording screen |
4 | FM Radio screen |
5 | Current Playlist screen |
6 | Settings menus |
7 | File browser |
8 | Database browser |
9 | Plugin browser |
10 | Quickscreen |
11 | Pitchscreen |
12 | Setting chooser |
13 | Playlist Catalogue Viewer |
14 | Plugin |
15 | Context menu |
16 | System Info screen |
17 | Time and Date Screen |
18 | Bookmark browser |
19 | Shortcuts menu |
20 | Track Info screen |
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>
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.
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.
Tag | Description |
%St(<setting | The value of the Rockbox setting with the specified name. See section E for the list of the available settings. |
%St(...) | Draw a bar using from the setting. See section D.28 for details. |
|
Examples:
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 image |
%xl(n,filename,[x,y], | Preload an image for later display (useful for when your
images are displayed conditionally). |
%xd(n[i] [,tag] [,offset]) | Display a preloaded image. n: image ID as it was specified in
%x or %xl |
%x9(n) | Display an image as a 9-patch bitmap covering the entire
viewport. |
|
Examples:
Note:
Once the album art files are present on your player, they can be displayed as follows.
Tag | Description |
%Cl(x,y,[maxwidth], | Define the settings for album art |
%Cd | Display the album art as configured. |
%C | Use in a conditional to determine if an image is available. |
|
The picture will be rescaled, preserving aspect ratio to fit the given maxwidth and maxheight. If the aspect ratio doesn’t match the configured values, the picture will be placed according to the alignment flags.
Examples:
For general information where to put album art see section C.
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.
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(…)
Tag | Description |
%?xx<true|false> | If / Else: Evaluate for true or false case |
%?xx<alt1|alt2| | Enumerations: Evaluate for first / second / third / …/ last condition |
%if(tag, operator, operand, [option count]) | Allows very simple comparisons with other tags. |
%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.
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.
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. |
%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 |
|
Tag | Description |
%Sx(English) | Display the translation of “English” in the current language |
|
Note: checkwps cannot verify that the string is correct, so please check on either the simulator or on target.
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 bar |
|
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.
Tag | Description |
%ss(start, length, tag [,number] | Get a substring from another tag. |
|
Use this tag to get a substring from another tag.
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. |
|