RedEye RWML Expression Functions: Built-in API Reference
Complete reference for all built-in expression functions in RedEye RWML: math, conditionals, strings, process launching, resource loading, and shell lifecycle.
Use this file to discover all available pages before exploring further.
Expression functions are the primary way to add dynamic behavior to your RedEye shell configuration. You can call them directly in any RWML attribute value or inside an <eval> block, and they receive resolved arguments — meaning you can nest function calls and variable references freely.
RedEye evaluates two kinds of expressions in RWML:
Variable substitution — ${varName} is replaced with the current value of varName from the variable store.
Function calls — funcName(arg1, arg2) invokes a registered expression function with the given arguments. Arguments can be quoted strings ('hello'), raw strings ({hello}), variable references, or nested function calls.
<!-- Variable substitution --><label text="${theme.font.color}"/><!-- Function call in an attribute --><panel backgroundColor="if(${window.isActive}, ${theme.color.backgroundActive}, ${theme.color.backgroundChild})"/><!-- Nested calls --><label text="concat('Width: ', calc('${taskbar.width} - ${taskbar.tray.width}'))"/>
String arguments use single quotes ('like this'). Raw strings use curly braces ({like this}) and are never variable-substituted. Backtick (`) is the escape character inside strings.
The literal string to return when the condition is false. If omitted, returns an empty string.
Returns:trueVal or falseVal as a literal string (not evaluated further).
<!-- Change background color based on whether a window is active --><panel backgroundColor="if(${window.isActive}, ${theme.color.backgroundActive}, ${theme.color.backgroundChild})"/>
Arguments to if are returned as-is — they are not evaluated as expressions. Use ife if you need the branches to be evaluated.
ife(condition, trueExpr, falseExpr)
Conditional that evaluates the chosen branch as a full RWML expression before returning it.
An RWML expression string to evaluate and return when the condition is false. If omitted, returns an empty string.
Returns: The result of evaluating the selected branch expression.
<!-- Call a function only when a condition is met --><label text="ife(${media.muted}, 'concat(Muted: , ${media.getVolume()})', ${media.getVolume()})"/>
A standard or custom .NET date/time format string (e.g., HH:mm, dd/MM/yyyy, ddd MMM d).
Returns: The current date and time as a formatted string.
<!-- Display a live clock (when used in a polling widget) --><label text="dateTime('HH:mm')"/><!-- Full date --><label text="dateTime('dddd, MMMM d')"/>
expand(path)
Expands Windows environment variable references in a string (e.g., %USERPROFILE%).
Optional command-line arguments to pass to the process.
Returns: An empty string.
<!-- Open a terminal --><hotkey keys="Win+T" action="shellExecute('cmd.exe')"/><!-- Open the default browser --><hotkey keys="Win+B" action="shellExecute('http:')"/><!-- Launch an app from the start menu app list --><panel onClick="shellExecute(${app.command})"/>
shellExecuteHidden(fileName, [args])
Launches a process silently: no window is created and the process is not shown in the taskbar. Errors are silently swallowed.
Sets the Windows work area — the region of the screen that is not covered by the taskbar or other always-on-top shell elements. Call this once when your taskbar window finishes loading to reserve its screen space.
Loads an image file into the resource store and returns a resource identifier that can be used as an src attribute value. Optionally resizes the image on load.
Restarts the RedEye shell process. The current process is killed via taskkill and a new instance is started immediately.Returns: An empty string (the process terminates before returning).