Changes
- Allow images to be visible through translucent windows:
- Terminal: Fix DECSCNM.
- Allow inline Lua expressions in settings #891:
There is now a way to evaluate attribute values in settings using Lua:
settings.xml<config> <desktop> <taskbar> <Pwsh='N = (N or 0) + 1; return "Pwsh"..N'/> <item id=$Pwsh type="dtvt" title="pwsh" cmd="$0 -r term pwsh"/> <item id=$Pwsh|" Video" type="dtvt" cmd="$0 -r term pwsh -c \"while ($true){ wsl -e bash -c 'mpv --vo=sixel --no-terminal /mnt/d/sdn/Desktop/RWVW2821.MP4' }\"" /> <item id=$Pwsh|" dtvt" type="dtvt" title="pwsh" cmd="$0 -r dtvt $0 -r term pwsh"/> </taskbar> </desktop> </config>
DynamicXML
Differences from Classical XML 1.1
...
-
Dynamic Features: References and Templates
Aspect Difference Element References Elements can reference the values or entire structures of other elements using relative or absolute paths. Any unquoted non-numeric value is treated as a reference. Script Expressions Prefixing any valid element reference with a dollar sign ( $) turns it into an Inline Script Expression. Instead of returning the raw text of the target element, the application evaluates its content via the host scripting engine at runtime (e.g., Lua, JavaScript, or a custom interpreter).
...
Note: DynamicXML strictly defines how paths with the
$prefix are traversed and resolved within the document tree. However, the syntax of the script code itself and the underlying runtime engine remain completely abstract and implementation-specific to the consuming application.
...
VTM Configuration Overview
Lua Scripting Integration
Within element values, an unquoted reference prefixed with a dollar sign (e.g., ... Expression='return "value"' element=$Expression ...) is treated as a dynamic Lua statement or function body. When resolved at runtime, vtm evaluates this Lua code within a persistent Lua state. The expression must execute a return statement.