Examples
TaskManSync includes a curated example catalog rather than expecting users to learn scripting from a blank page. The catalog contains Scripted Decorations as well as Plain Text and TDML examples.
Open TaskManSync Settings > Other Settings > Export Examples…, choose a destination, and open the created examples folder. Export copies source files; it does not install or place Decorations. In Decorations, either choose Import Decorations (the icon-only button beside + New) and add files from examples/, or choose Scripted from + New and then Import a file from examples/scripted/; then Place the definition. Use Getting Started for editing and saving. Import Decorations accepts .lua, .pt, and .tdml files and applies each file’s metadata header (name and settings); see Importing and Exporting. Pasting a Plain Text or TDML example into a Decoration’s editor stores only its text, and only the header’s name is read, so import the file to get its settings.
Choose a starting point by the feature you want to learn:
| Exported Lua file | What it demonstrates | Configuration or behavior to know |
|---|---|---|
Clock.lua | Local time/date, relative TDML text sizes, periodic updates, calendar Window | Edit SHOW_SECONDS, MILITARY_TIME, and SHOW_AM_PM; labels use built-in English abbreviations |
Click Counter.lua, Click Counter Alternate.lua | Taskbar clicks, modifiers, private persistent state | Both increment on left-click and decrement on Shift-click; Alternate adds Ctrl mode toggle, Alt reset, and middle-click reset |
Status Toggle.lua | Fixed taskbar extent and persistent boolean state | Left-click toggles ACTIVE/PAUSED; middle-click resets to PAUSED; these labels describe the example’s own state |
Custom Badge.lua | inputbox and number fields read by an Apply action | Left-click opens the editor; values reset on reload because the example does not store them |
Alarm.lua | dateTime/boolean inputs, persistent deadline, one-shot schedule, optional generated chime | Minute-resolution alarm; click toggles its Window, firing opens it and pulses the taskbar label |
Timer.lua | Duration input, countdown, deadline persistence and reconstruction | Click toggles its Window; completion opens it and animates the label |
Rich Text Editor.lua | Rich-text input value, native toolbars, HTML persistence, commit confirmation | Left-click opens it; edits persist only when Save is pressed |
System Information Dashboard.lua | Sequential asynchronous system requests and a graphical Window | Opens immediately; manual refresh and 30-second refresh while its animated Window drives updates; reports point-in-time OS/CPU/memory/root-disk/uptime data, not GPU/network/sensors |
Temperature.lua | HTTP GET, checked JSON responses, sequential requests, periodic refresh | Requires network access; edit LOCATION (name/latitude/longitude) and USER_AGENT to meet U.S. NWS identification requirements; no API key; Fahrenheit output, ten-minute refresh |
NVIDIA VRAM Usage.lua | External process output parsing | Requires an NVIDIA GPU/driver and nvidia-smi on PATH; edit MEMORY_FORMAT to GiB or MiB; five-second refresh |
Aquarium Fish Taskbar.lua | Animated retained paths and click interaction | Left-click adds a fish; Shift-click removes a random fish |
Winter Scene.lua, Bioluminescent Deep Sea.lua, Surfer Taskbar.lua | Layered animated taskbar scenes | Illustrative scenes, not live system information |
Rotating Drifting Shapes Taskbar.lua, Rotating Drifting Shapes Window.lua | Same line/path concepts on two surfaces | Window version opens immediately; click toggles it, F11 enters fullscreen, resize adjusts the scene |
Deep Space Flight Computer.lua | Cell Space, lines, visual buttons, keyboard and responsive resize callbacks | Simulated radar/telemetry, not real sensors; F11 fullscreen, S sensor-view toggle, Ctrl+R redraw |
Code Rain.lua | Animated Cell Space Window | Taskbar click toggles it; F11 fullscreen |
Terminal Noise.lua | Retained Cell Space and per-cell animation with applyCellMutations() | Every visible cell changes each frame; grids over 8,192 cells show a notice, R restores the default size; taskbar click toggles it |
Text Crawl.lua, Signal Sweep.lua | Whole-presentation positioning and TDML updates | Built-in sample text; Signal Sweep does not report actual synchronization state |
Use the examples as working starting points: inspect the source, change one part, save with Reload Decoration enabled, then try the placed Decoration. Import stores a copy, so later changes to the exported file require Re-import; editor saves do not modify that file. Review external effects before importing scripts from other sources.
Lua variables, Window inputs, and native Window content are not automatically persistent. Examples using storage keep values by Decoration Name, while source constants require editing the script rather than a universal script-options dialog. Cloning creates a new storage scope; reload retains the existing scope. Keep multiple scripts’ metadata Names unique when importing them as separate definitions.
For the relevant contracts, use Decoration updates and graphics, Window inputs and content, storage and scheduling, desktop services, and sound. A Window closed with its native close button may remain closed after reload until the taskbar click reopens it; fullscreen Escape is host-managed.