Use TerminalWidget’s AppleScript dictionary to update widgets from Script Editor, AppleScript apps, and automation tools.

Add a widget first. AppleScript only updates widgets you place yourself (Desktop or Home Screen) after you set Edit Widget → Target name to match the target parameter. See Integrations → Getting Started.

Usage

tell application "TerminalWidget"
render widget target "widget1" text "Hello from AppleScript" icon "terminal.fill"
end tell

Commands

Examples

tell application "TerminalWidget"
render widget target "widget1" text "Deploy done" icon "checkmark.circle.fill" ¬
notify true
render chart target "widget1" chart "1 2 3 4 5" chart format "smooth" ¬
annotation true caption true timestamp true
render chart target "widget1" chart "0 1 5 2/1 2 5 3" chart format "bar" ¬
foreground "#cc0000,#00cc00,#0000cc" annotation true
render chart target "widget1" chart "1 4 9 3/2 5 8 4/6 7 5 2" chart format "series" ¬
chart series labels "CPU,Memory,Disk" foreground "#f87171,#4ade80,#60a5fa" background "#0f172a"
render chart target "widget1" chart "CPU:45 Memory:30 Disk:25" chart format "pie" ¬
foreground "#f87171,#4ade80,#60a5fa" background "#0f172a"
render widget target "cpu" chart "CPU:45 Memory:30 Disk:25" chart format "pie" ¬
chart key "external" key target "cpu-key" background "#0f172a" foreground "#e2e8f0"
render chart target "widget1" chart "1-3 2-3 1-4" chart format "rangebar"
render widget target "widget1" append data "6 7" limit 20
render progress target "widget1" progress 72 ¬
progress format "circle" chart bar style "glass" caption true
render progress target "widget1" progress 72 ¬
progress format "gradient-horizontal" ¬
gradient from "#38bdf8" gradient to "#0ea5e9" gradient width 24 ¬
caption true timestamp true
render text target "widget1" text "Build passed" icon "checkmark.circle.fill"
render image (POSIX file "/tmp/status.png") target "widget1" ¬
filter "sepia:65,blur:8" full width true
render image "/tmp/status.png" target "widget1" padding "12"
render widget image (POSIX file "/tmp/status.png") target "widget1"
render background image "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=1600&q=80" ¬
target "widget1" filter "alpha:40"
render widget target "widget1" background image "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=1600&q=80" ¬
filter "alpha:35" chart "4 8 15 16 23 42" text "Throughput"
end tell

Dictionary

Explore the dictionary in Script Editor with File->Open Dictionary (⇧⌘O). Select TerminalWidget from the dictionary selection window.

render widgetv : Apply a full widget update using CLI-style options.

render textv : Convenience wrapper for text updates.

render chartv : Convenience wrapper for chart updates.

render progressv : Convenience wrapper for progress updates.

render imagev : Convenience wrapper for image updates.

render background imagev : Convenience wrapper for full-bleed background image updates.

render tablev : Convenience wrapper for table updates.

Notes