Text2skin-skin reference
This documentation is valid for the "1.0" version of the text2skin-plugin.
Elements
<skin>
This is the root element of the skins. All further elements go inside this container.
Attribute | Value | Description |
---|---|---|
version | VERSION | Version of the skin format (this is fix value, currently "1.0") |
name | NAME | Name to display in the VDR-OSD |
screenBase |
|
Should the skin be drawn "relative" (OSD left, top, width, height) to the VDR setup or "absolute" to an area of 720x576 |
example | ||
<?xml version="1.0"?> <skin version="1.0" name="brushed Aluminium" screenBase="relative"> . . . </skin> |
<display>
For each type of the OSD display a <display>-section is required.
Attribute | Value | Description |
---|---|---|
id |
|
Type of the OSD display |
example | ||
<?xml version="1.0"?> <skin version="1.0" name="brushed Aluminium" screenBase="relative"> <display id="replayInfo"> . . . </display> </skin> |
<window>
Each <display>-container has to start with a definition of drawing areas.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
bpp | NUMBER | Color depth of the drawing area (4 = 16 colors, 8 = 256 colors) |
example | ||
<?xml version="1.0"?> <skin version="1.0" name="brushed Aluminium" screenBase="relative"> <display id="replayInfo"> <window x1="0" x2="619" y1="-113" y2="-84" bpp="4" /> <window x1="20" x2="99" y1="-83" y2="-44" bpp="4" /> . . . </display> </skin> |
<rectangle>
Draws a filled rectangle.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Color of the rectangle |
example | ||
<rectangle x1="20" x2="99" y1="-83" y2="-44" color="#00000000" /> |
<ellipse>
Draws a circle, a pitch circle, or a ellipse.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Color |
arc | NUMBER | Pitch circle |
example | ||
<ellipse x1="5" y1="7" x2="14" y2="15" color="GraphLight" condition="{IsMenuCurrent}"/> |
<slope>
Draws a curve.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Color |
arc | NUMBER | Direction |
example | ||
<slope x1="10" x2="100" y1="10" y2="100" arc="1" color="#CC000066" /> |
<image>
Display an image.
Attribute | Value | Description |
---|---|---|
x | NUMBER | Position of the left border (no scaling) |
y | NUMBER | Position of the top border (no scaling) |
x1 | NUMBER | Position of the left border (with scaling) |
y1 | NUMBER | Position of the top border (with scaling) |
x2 | NUMBER | Position of the right border (with scaling) |
y2 | NUMBER | Position of the bottom border (with scaling) |
condition | FUNCTION/TOKEN | Complex condition |
alpha | NUMBER | Transparency (0-255) |
colors | NUMBER | Maximum amount of colors in the scaled image (if scaling should be applied) |
color | STRING | Replacement color for color 1 of the image |
bgColor | STRING | Replacement color for color 0 of the image |
maskColor | STRING | Mask color (skipped when image is drawn) |
path | STRING/TOKEN | Image file |
example | ||
<image x="0" y="-70" path="Aluminium_volumebar.png" /> <image x="585" y="138" condition="{CanScrollUp}" path="symbols/arrowup.xpm" color="#AFFFFF00" /> |
<text>
A static or compound text.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Text color |
align |
|
Alignment of the text |
font | STRING | Font name |
example | ||
<text x1="42" x2="571" y1="-113" y2="-86" color="#FF000000" font="Osd">{ReplayTitle}</text> |
<marquee>
An alternative to <text> for oversized texts. Scrolls text if needed.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Text color |
delay | NUMBER | Scroll rate (in msec) |
align |
|
Alignment of the text |
font | STRING | Font name |
example | ||
<marquee x1="130" x2="480" y1="423" y2="445" color="Text" font="Sml">{ReplayTitle}</marquee> |
<blink>
An alternative to <text> which lets the text blink.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Text color |
blinkColor | STRING | Highlight color (optional; default: on/off) |
delay | NUMBER | Blink rate (in msec) |
align |
|
Alignment of the text |
font | STRING | Font name |
example | ||
<blink x1="30" x2="80" y1="90" y2="80" color="Text" blinkColor="Green" delay="800" font="Sml" condition="{IsRunning}">{PresentStartDateTime:%H\:%M}</blink> |
<scrolltext>
A multiline text.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Text color |
align |
|
Alignment of the text |
font | STRING | Font name |
example | ||
<scrolltext x1="24" y1="138" y2="-72" x2="583" font="helmetr.ttf:20" color="#AFFFFF00"> {PresentShortText} {PresentDescription} </scrolltext> |
<scrollbar>
A scrollbar.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Color of the bar |
bgColor | STRING | Color of the background |
example | ||
<scrollbar x1="585" x2="608" y1="162" y2="-110" color="#AFFFFF00" bgColor="#8F2B1B9E" /> |
<progress>
A progressbar.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
color | STRING | Color of the bar |
bgColor | STRING | Color of the background |
mark | STRING | Color of the cutting marks |
active | STRING | Color of the active area |
keep | STRING | Color of the video area that should be kept |
current | NUMBER/TOKEN | Current index value |
total | NUMBER/TOKEN | Maximum index value |
example | ||
<progress x1="19" x2="556" y1="-17" y2="-7" color="#AF000000" current="{VolumeCurrent}" total="{VolumeTotal}" /> <progress x1="129" x2="478" y1="487" y2="502" color="#FFCE7B00" bgColor="Blue" mark="Black" active="Black" keep="Black" current="{ReplayPositionIndex}" total="{ReplayDurationIndex}"/> |
<block>
A <block></block> groups several objects together.
Attribute | Value | Description |
---|---|---|
condition | FUNCTION/TOKEN | Complex condition |
example | ||
<block condition="file('logos/{ChannelName}.mng')"> <rectangle x1="4" x2="67" y1="4" y2="51" color="#AF000000" /> <image x="0" y="0" path="logos/{ChannelName}.mng" /> </block> |
<list>
Defines a list in the menu.
Attribute | Value | Description |
---|---|---|
x1 | NUMBER | Position of the left border |
y1 | NUMBER | Position of the top border |
x2 | NUMBER | Position of the right border |
y2 | NUMBER | Position of the bottom border |
condition | FUNCTION/TOKEN | Complex condition |
example | ||
<list x1="24" y1="62" x2="569" y2="-82"> <item height="28"/> <text x1="25" x2="569" y1="3" y2="27" color="#AF00FFFF" font="Sml">{MenuGroup}</text> <text x1="25" x2="569" y1="3" y2="27" color="#AFFFFFFF" font="Sml">{MenuItem}</text> <rectangle x1="0" x2="579" y1="0" y2="27" color="#FF2B1B9E" condition="{IsMenuCurrent}" /> <text x1="22" x2="569" y1="0" y2="27" color="#AFFFFFFF" font="Osd">{MenuCurrent}</text> <text x1="0" x2="25" y1="0" y2="27" color="#AFFFFFFF" font="Osd">-></text> </list> |
<item>
Defines an item for the list.
Attribute | Value | Description |
---|---|---|
condition | FUNCTION/TOKEN | Complex condition (possible, but makes little sense) |
height | NUMBER | Height of one list item |
example | ||
<list x1="24" y1="62" x2="569" y2="-82"> <item height="28" /> <text x1="25" x2="569" y1="3" y2="27" color="#AF00FFFF" font="Sml">{MenuGroup}</text> <text x1="25" x2="569" y1="3" y2="27" color="#AFFFFFFF" font="Sml">{MenuItem}</text> <rectangle x1="0" x2="579" y1="0" y2="27" color="#FF2B1B9E" condition="{IsMenuCurrent}" /> <text x1="22" x2="569" y1="0" y2="27" color="#AFFFFFFF" font="Osd">{MenuCurrent}</text> <text x1="0" x2="25" y1="0" y2="27" color="#AFFFFFFF" font="Osd">-></text> </list> |
Token
Common
Token | Comment | Description |
---|---|---|
DateTime | (see "man strftime") | Current date/time |
IsRecording | True, if VDR is currently recording | |
CurrentRecording | delivers every 2 secs all current recordings Attribute: Number to choose n-th current recording | |
FreeDiskSpace | Remaining free disk space in MB Attribute: return as formatted time. | |
CanScrollUp | True, if scrollable text can be scrolled up | |
CanScrollDown | True, if scrollable text can be scrolled down | |
AudioTrack | Identifier of the current audio-track | |
AudioChannel | Identifier of the switched channel ("stereo", "left" or "right") | |
ReplayMode | Type of the replay (e.g. "dvd", "vcd", "mp3", "normal", ...) | |
ReplayIsShuffle | True, if replay is in shuffle mode (currently only in mp3 mode) | |
ReplayIsLoop | True, if replay is in loop mode (currently only in mp3 mode) |
Channel Display
Token | Comment | Description |
---|---|---|
ChannelNumber | Channel number ("channel number-" if there is an input at this time) | |
ChannelName | Channel or group name | |
ChannelShortName | Short name of channel if available | |
ChannelBouquet | Provider/bouquet name, if available | |
ChannelPortal | Portal name if available | |
ChannelSource | Signal source (e.g. "S19.2E") | |
ChannelID | Identifier of the current channel | |
PresentStartDateTime | (also in Menu Display) | Start time of current title |
PresentVPSDateTime | (also in Menu Display) | VPS start time of current title if available |
PresentEndDateTime | (also in Menu Display) | End time of current title |
PresentDuration | (also in Menu Display) | Duration of current title |
PresentProgress | (also in Menu Display) | Elapsed time of current title |
PresentRemaining | (also in Menu Display) | Remaining time of current title |
PresentTitle | (also in Menu Display) | Title/heading of current title |
PresentShortText | (also in Menu Display) | Short text/episode of current title |
PresentDescription | (also in Menu Display) | Description of current title |
PresentHasTimer (alt: HasTimer) | (auch in Menu Display) | True, if a timer for the current title is set |
PresentIsRunning (alt: IsRunning) | (also in Menu Display) | True, if the current title has the state "running" |
PresentHasVPS | (also in Menu Display) | True, if VPS for the current title is available |
FollowingStartDateTime | Start time of following title | |
FollowingVPSDateTime | VPS start time of following title if available | |
FollowingEndDateTime | End time of following title | |
FollowingDuration | Duration of following title | |
FollowingTitle | Title/heading of following title | |
FollowingShortText | Short text/episode of following title | |
FollowingDescription | Description of following title | |
FollowingHasTimer | True, if the following title is targeted by a timer | |
FollowingIsRunning | True, if the following title has the status "running" | |
FollowingHasVPS | True, if the following title has it's own VPS-time | |
ButtonRed | (also in Menu Display, Replay Display) | Caption of red button if available |
ButtonGreen | (also in Menu Display, Replay Display) | Caption of green button if available |
ButtonYellow | (also in Menu Display, Replay Display) | Caption of yellow button if available |
ButtonBlue | (also in Menu Display, Replay Display) | Caption of blue button if available |
Language | language (currently only "Audio 1", "Audio 2" or "Digital Audio") | |
ChannelHasTeletext (alt:HasTeletext) | True, if teletext is available on current channel | |
ChannelHasMultilang (alt: HasMultilang) | True, if multi language on current channel | |
ChannelHasDolby (alt: HasDolby) | True, if Dolby Digital on current channel | |
ChannelIsEncrypted (alt: IsEncrypted) | True, if current channel is encrypted | |
ChannelIsRadio (alt: IsRadio) | True, if current channel is a radio channel | |
ChannelHasVPS (alt: HasVPS) | (also in Menu Display) | True, if current channel can broadcast VPS |
Volume Display
Token | Comment | Description |
---|---|---|
VolumeCurrent | Current volume (0-VolumeTotal) (numeric) | |
VolumeTotal | Maximum value for volume | |
VolumeIsMute (alt: IsMute) | True, if volume is muted |
Message Display
Token | Comment | Description |
---|---|---|
Message | (also in all other displays) | Text of the current message if available (whatever type) |
MessageStatus | (also in all other displays) | Text of the current message if available (status message) |
MessageInfo | (also in all other displays) | Text of the current message if available (information) |
MessageWarning | (also in all other displays) | Text of the current message if available (warning) |
MessageError | (also in all other displays) | Text of the current message if available (error) |
Replay Display
Token | Comment | Description |
---|---|---|
ReplayTitle | Attribute: clean | Title of the current replay |
ReplayPositionIndex | Position in the current replay (numeric, analog to PresentProgress) | |
ReplayDurationIndex | Duration of the current replay (numeric, analog to PresentDuration) | |
ReplayRemaining | Remaining time of the current replay (numeric, analog to PresentRemaining) | |
ReplayPrompt | Input request, if available (e.g. "Jump: --:--") | |
ReplayIsPlaying (alt: IsPlaying) | Attribute: 0 = no multispeed, 1-3 = multispeed, nothing = any | True, if a replay is runnning at normal speed |
ReplayIsFastForward (alt: IsFastForward) | Attribute: 0 = no multispeed, 1-3 = multispeed, nothing = any | True, if fast forward |
ReplayIsFastRewind (alt: IsFastRewind) | Attribute: 0 = no multispeed, 1-3 = multispeed, nothing = any | True, if fast rewind |
ReplayIsSlowForward (alt: IsSlowForward) | Attribute: 0 = no multispeed, 1-3 = multispeed, nothing = any | True, if slow forward |
ReplayIsSlowRewind (alt: IsSlowRewind) | Attribute: 0 = no multispeed, 1-3 = multispeed, nothing = any | True, if slow rewind |
ReplayIsPausing (alt: IsPausing) | Attribute: 0 = no multispeed, 1-3 = multispeed, nothing = any | True, if replay is pausing |
ReplayPosition | Position in the replay, completely formatted, with frames at cutting marks, otherwise without frames | |
ReplayDuration | Duration of the replay, completely formatted | |
ButtonRed | (also in Channel Display, Menu Display) | Caption of red button if available |
ButtonGreen | (also in Channel Display, Menu Display) | Caption of green button if available |
ButtonYellow | (also in Channel Display, Menu Display) | Caption of yellow button if available |
ButtonBlue | (also in Channel Display, Menu Display) | Caption of blue button if available |
Menu Display
Token | Comment | Description |
---|---|---|
MenuTitle | Attribute: "clean", "rest" | Title of the menu page, or filtered title with "clean" or rest of the filtered title |
MenuGroup | Text of the current list item if it is a group/delimiter | |
IsMenuGroup | True, if currently drawn list item is a group/delimiter | |
MenuItem | Text of the current list item if it is a normal entry | |
IsMenuItem | True, if currently drawn list item is a normal entry | |
MenuCurrent | Attribute: "clean" | Text of the current list item if it is the selected entry |
IsMenuCurrent | True, if currently drawn list item is the selected entry | |
MenuText | Attribute: "clean" | Text page to display instead of the list (e.g. display in the command menu) |
RecordingName | Name of the current recording | |
RecordingDateTime | Start time of the current recording | |
RecordingTitle | Title/heading of the current recording | |
RecordingShortText | Short text/episode of the current recording | |
RecordingDescription | Description of the current recording | |
RecordingLanguageCode | ||
RecordingLanguageDescription | ||
ButtonRed | (also in Channel Display, Replay Display) | Caption of red button if available |
ButtonGreen | (also in Channel Display, Replay Display) | Caption of green button if available |
ButtonYellow | (also in Channel Display, Replay Display) | Caption of yellow button if available |
ButtonBlue | (also in Channel Display, Replay Display) | Caption of blue button if available |
PresentStartDateTime | (also in Channel Display) | Start time of current title |
PresentVPSDateTime | (also in Channel Display) | VPS start time of current title if available |
PresentEndDateTime | (also in Channel Display) | End time of current title |
PresentDuration | (also in Channel Display) | Duration of current title |
PresentProgress | (also in Channel Display) | Elapsed time of current title |
PresentRemaining | (also in Channel Display) | Remaining time of current title |
PresentTitle | (also in Channel Display) | Title/heading of current title |
PresentShortText | (also in Channel Display) | Short text/episode of current title |
PresentDescription | (also in Channel Display) | Description of current title |
PresentHasTimer (alt: HasTimer) | (also in Channel Display) | True, if a timer for the current title is set |
PresentIsRunning (alt: IsRunning) | (also in Channel Display) | True, if the current title has the state "running" |
PresentHasVPS | (also in Channel Display) | True, if VPS for the current title is available |
ChannelHasVPS (alt: HasVPS) | (also in Channel Display) | True, if current channel can broadcast VPS |
Audio Tracks Display
Token | Comment | Description |
---|---|---|
MenuTitle | Title display of the audio-track list | |
MenuItem | Text of the current list item if it is a normal entry | |
IsMenuItem | True, if currently drawn list item is a normal entry | |
MenuCurrent | Text of the current list item if it is the selected entry | |
IsMenuCurrent | True, if currently drawn list item is the selected entry | |
AudioTrack | Identifier of the current selected audio-track | |
AudioChannel | Identifier of the switched channel ("stereo", "left" or "right") |
Functions
not
Negation of the term.
not(equal({PresentStartDateTime},{PresentVPSDateTime}))
and
True, if all parameters are true.
and({CanScrollUp},{CanScrollDown})
or
True, if at least one parameter is true.
or({CanScrollUp},{CanScrollDown})
equal
True, if both parameters are equal.
equal('Kanäle', trans('Channels'))
ne
True, if both parameter are unequal (not equal).
ne({ReplayMode}, 'normal')
gt
True, if the first parameter is greater than the second.
gt({FreeDiskSpace},5000)
ge
True, if the first parameter is greater or equal than the second
ge({FreeDiskSpace},5000)
lt
True, if the first parameter is less than the second.
lt({FreeDiskSpace},5000)
le
True, if the first parameter is less or equal than the second.
gt({FreeDiskSpace},5000)
file
Returns the parameter, if the file exists in the skin directory.
file('logos/{ChannelName}.png')
trans
Returns the translation (i18n) of the parameter or false, if no translation is found.
equal('Kanäle', trans('Channels'))
Attributes
arc
Attribute | Value | Meaning (ellipse) | Meaning (slope) |
---|---|---|---|
arc | 0 | full ellipse | horizontal, increasing, bottom |
1 | first quadrant | horizontal, increasing, top | |
2 | second quadrant | horizontal, decreasing, bottom | |
3 | third quadrant | horizontal, decreasing, top | |
4 | fourth quadrant | vertical, increasing, right | |
5 | right half | vertical, increasing, left | |
6 | upper half | vertical, decreasing, right | |
7 | left half | vertical, decreasing, left | |
8 | lower half | ||
-1..-8 | invers of the above |
color
Also concerns bgColor, maskColor, blinkColor, mark, active, keep.
Colors are given in RGB format with transparency like this:
color="#AARRGGBB"
- A = alpha value (transparency 0-255)
- R = red value
- G = green value
- B = blue value
Some examples:
AARRGGBB color="#00000000" = black, fully transparent (translucent) color="#FF000000" = black, full opacity color="#7F000000" = black, half translucent color="#7FFFFFFF" = white, half translucent
For sure you can use every value between.
Colors might also be given as symbolic value which has to be defined in .colors file of the skin, e.g.:
color="MenuTextFg"
font
There are three predefined fonts
- Osd
- Fix
- Sml
For those who have installed the freetype library and activated at compile time every font found at
- /etc/vdr/plugins/text2skin/fonts/
or
- /etc/vdr/plugins/text2skin/SkinName/
is usable.
In the skin file the font name,
font="Osd"
or, for Truetype fonts, the font filename and size (and optional width too)
font="helmetr.ttf:SIZE[,WIDTH]"
is given.