Windows toast notifications for WSL and scripts: buttons that run commands, answers you can wait for, progress
bars, and a drop-in notify-send.
toastback shows a toast (or a native dialog) and returns immediately. When someone clicks a button,
even hours later from the notification center, Windows starts toastback again and it runs the command
attached to that button: in WSL (by default in the distro, user and directory that sent the notification) or
on Windows. A script that needs the answer right away waits for it with --wait.
notify-send "Backup finished" "42 GB in 12 min" # existing scripts work unchanged
toastback -t "Backup finished" -m "42 GB in 12 min" # toastback's own flags; prints the notification id
toastback examples deploy | toastback # buttons that run commands
choice=$(toastback examples reboot-dialog | toastback --wait) # a dialog; prints the button chosen- A drop-in
notify-send.installputsnotify-sendon your PATH in WSL, so scripts and tools that call it show Windows toasts without changes: urgency, icons, actions (-A),-w, progress hints and stack tags included. See Asnotify-send. - Native, small and fast. Written in Rust on Windows' own toast API (WinRT): one self-contained 1.3 MB exe, no runtime, no PowerShell, no .NET. Showing a toast takes about 80 ms from WSL and 50 ms from PowerShell. Windows 10 22H2+ / Windows 11, per-user install, no admin rights.
- Buttons run commands in WSL (a login shell or an argv), cmd, PowerShell, any exe, or open a URL/file.
- Progress bars that move in place (
toastback update), banners that stay longer (duration), urgent toasts that get through Do not disturb (Windows 11). - Click a toast's text to open a details dialog with the same buttons, or use
mode: dialogfor prompts that must not be missed. - Callback output, exit codes and timings are logged (
toastback log). Optional "done"/"failed" toasts.
Releases follow semantic versioning; what changed is in CHANGELOG.md. The design is in docs/plan.md and docs/adr/.
toastback always installs on the Windows side, for your user and without admin rights, even when you start the
install from WSL. To call it from WSL, it also needs a small shim script, ~/.local/bin/toastback, in each distro
you use. Pick the method that matches how you work:
| Method | Best for | Shim goes to | Added to the Windows PATH |
|---|---|---|---|
| winget | Windows and WSL, with upgrades through winget | the default distro | yes |
| Scoop | Windows and WSL, with upgrades through Scoop | the default distro | yes, as Scoop's toastback-cli |
install.sh |
working mainly in one distro | that distro, for your user | with --add-to-path |
| Zip | no winget, or a specific version on Windows | the default distro | with --add-to-path |
| From source | developing toastback | that distro, for your user | yes |
Whichever you use, install copies toastback.exe and toastback-cli.exe to %LOCALAPPDATA%\toastback\bin,
registers the toastback:// protocol, the notification app id and an Apps & Features entry (HKCU only), writes the
shim and a notify-send wrapper next to it, and shows a test notification. toastback doctor
checks everything.
winget install GergoDrazsdik.ToastbackThen open a new terminal, so that it sees the new PATH. Upgrade with winget upgrade GergoDrazsdik.Toastback, which
refreshes the shims you already have, and remove it with winget uninstall GergoDrazsdik.Toastback. winget's
install shows no test notification; try toastback-cli -t hello instead.
scoop bucket add gergodrazsdik https://github.com/gergodrazsdik/scoop-bucket
scoop install gergodrazsdik/toastbackScoop puts toastback-cli on your PATH. Upgrade with scoop update toastback, which refreshes the shims you already
have, and remove it with scoop uninstall toastback (--purge also deletes logs and pending notifications). Use
either Scoop or winget, not both: they'd manage the same installation.
In an empty directory, download the installer and the checksums, check the installer and read it. less only opens
once the checksum is right (install.sh: OK):
cd "$(mktemp -d)"
base=https://github.com/gergodrazsdik/toastback/releases/latest/download
curl -fsSLO "$base/install.sh" && curl -fsSLO "$base/SHA256SUMS"
grep ' install\.sh$' SHA256SUMS | sha256sum -c - && less install.shThen, in the same directory, run it (add --add-to-path for toastback-cli in cmd and PowerShell):
sh install.shinstall.sh downloads toastback.exe, toastback-cli.exe and the release's SHA256SUMS into your Windows temp
folder, checks the exes against it, and runs toastback.exe install for your distro and user. Extra arguments go
to install. For a specific version, use releases/download/v1.0.0 as base and run
TOASTBACK_VERSION=v1.0.0 sh install.sh. Release builds also carry a
build provenance attestation:
gh attestation verify toastback.exe -R gergodrazsdik/toastback (likewise toastback-cli.exe, the zip and, in
releases after 1.0.0, install.sh) shows that GitHub Actions built the file from this repository.
Download toastback-x86_64.zip from the releases, extract it
anywhere, then in that folder run:
.\toastback-cli.exe install --add-to-pathYou can delete the extracted folder afterwards. To upgrade, do the same with the new zip.
In WSL, with cargo-xwin, clang/lld/llvm and
just: just setup once, then just install.
Choose with --wsl. Without it, install uses the calling distro when run through install.sh or just install.
From Windows, a first install uses the default distro, and a later one (including winget upgrade) refreshes the
shims from the last install, so your choice stays.
--wsl |
Writes the shim to |
|---|---|
default |
the default distro (the one marked * in wsl -l -v) |
all |
every distro except Docker Desktop's (docker-desktop*), which are skipped with a note |
| a distro name | that distro, including Docker Desktop's if you name it; it must exist |
none |
nowhere, for Windows-only use (removes the shims of earlier installs too) |
If Docker Desktop's distro is your default, no shim is written and a warning asks you to choose one with --wsl. If
a shim you asked for with --wsl can't be written, install exits with an error; without --wsl it only warns, and
a later install tries again.
Other install options:
| Option | Meaning |
|---|---|
--add-to-path |
add the install dir to your user PATH, for toastback-cli in cmd/PowerShell |
--quiet |
skip the test notification |
--no-notify-send |
don't write the notify-send wrapper, and remove ours; later installs keep it off |
--notify-send |
write the wrapper again after an earlier --no-notify-send |
--skill |
also write the agent skill to ~/.claude/skills/toastback/; later installs keep it current |
--no-skill |
remove the agent skill that --skill wrote, and stop writing it |
For a distro you installed later, or one the install skipped. From inside that distro, so that the shim is for your
user there (replace <you> with your Windows user name):
/mnt/c/Users/<you>/AppData/Local/toastback/bin/toastback.exe install --quiet \
--wsl "$WSL_DISTRO_NAME" --distro "$WSL_DISTRO_NAME" --user "$(id -un)"Or from PowerShell, for that distro's default user:
& "$env:LOCALAPPDATA\toastback\bin\toastback-cli.exe" install --quiet --wsl Ubuntu-24.04Existing shims stay, and later upgrades refresh the new one too. If toastback isn't found in a new terminal in that
distro, add ~/.local/bin to your PATH there.
Upgrade the way you installed: re-running install replaces the exes. toastback uninstall [--purge] removes
everything, whichever way it was installed; so does Apps & Features. --purge also deletes logs and pending
notifications.
toastback [show] [FILE | -] [-t TITLE] [-m BODY] [-d DETAILS] [-i ICON]
[--mode toast|dialog] [--scenario default|reminder|alarm|urgent] [--id ID]
[--duration short|long] [--progress VALUE [--progress-status TEXT]]
[--wait [--timeout DURATION]]
The spec comes from FILE, from stdin (-, or when no -t/-m is given), or only from flags. Flags
override fields of the spec. toastback prints the notification id and exits:
| Exit code | Meaning |
|---|---|
| 0 | shown (the id is on stdout) |
| 2 | invalid spec or unreadable image |
| 3 | failed to show |
| 4 | not installed |
By default toastback returns at once and a click runs the button's callback later. With --wait it waits until
the notification is answered and prints the answer instead of the id: the clicked button's id, or __body for a
click on the toast's text. A button's callback still runs.
choice=$(toastback examples reboot-dialog | toastback --wait --timeout 10m)
case $? in 0) echo "chose $choice" ;; 5) echo "dismissed" ;; 6) echo "no answer" ;; esac
id=$(toastback -t "Deploy finished" -m "Click to open the log"); …; toastback wait "$id"toastback wait ID [--timeout DURATION] waits the same way for a notification that's already shown, also one
answered before wait started. DURATION is like expires: 90s, 5m, 1h30m.
| Exit code | Meaning |
|---|---|
| 0 | answered (the answer is on stdout) |
| 2 | wait: no notification with that id (or an invalid --timeout) |
| 5 | closed without a choice: dismissed, a dialog closed, removed (toastback remove), shown again under its id |
| 6 | timed out: --timeout passed, or the notification expired |
| 130 | Ctrl-C (from cmd or PowerShell; in WSL the shell reports 1, WSL's own code for a Ctrl-C). Either way the wait stops, and the toast stays with its buttons working |
A toast whose banner times out moves to the notification center and can still be answered there; waiting goes on.
A toast can show a progress bar (progress in the spec, or --progress with --progress-status), and
toastback update moves it in place: no new banner, no sound. Values are 0 to 1, a percentage (40%) or
indeterminate (a moving bar).
id=$(toastback -t "Backup" --progress 0 --progress-status "Starting")
toastback update "$id" --progress 40% --status "Copying photos"
toastback update "$id" --progress 1 --status "Done"toastback update ID [--progress VALUE] [--status TEXT] [--title TEXT] [--label TEXT] changes what you pass and
keeps the rest. --title and --label work only if the toast was shown with a progress title or label (show it
again with the same --id to add one). Exit 0: updated; 2: nothing to update, or the toast can't show it (a dialog,
no progress bar); 3: Windows failed; 5: no longer shown (clicked, dismissed, removed or expired). Showing again with
the same --id replaces the toast with a new banner instead.
Other commands:
| Command | What it does |
|---|---|
toastback examples [NAME] |
list the built-in example specs, or print one (> my.json to start your own) |
toastback wait ID [--timeout DURATION] |
wait until a notification is answered, see above |
toastback update ID [--progress VALUE] [--status TEXT] … |
move a toast's progress bar in place, see above |
toastback log [-n N] [--id ID] |
recent events: shown, clicked, callback output and exit codes |
toastback validate FILE... |
check specs (and their images) without showing them; exit 2 if any is invalid |
toastback remove ID... / toastback clear |
take notifications out of the notification center; their buttons stop working |
toastback doctor [--json] |
check install, registration, notification settings, WSL and the shim |
toastback shim [--win-exe PATH] |
print the WSL shim |
toastback skill |
print the agent skill |
toastback notify-send [OPTION…] SUMMARY [BODY] |
notify-send's command line, see below |
toastback --version |
version and git commit |
Use toastback-cli (after a winget install or install --add-to-path, or by its full path). It's the same program built as a
console app, so the shell waits for it, prints its output in order and sets $LASTEXITCODE. toastback.exe
is a GUI app (so that clicking a button never flashes a console window), and interactive shells don't wait
for those.
$id = toastback-cli -t "Build done" -m "Release build finished in 4 min"
toastback-cli C:\specs\deploy.json; if ($LASTEXITCODE) { throw "toastback failed" }These work as is: call ~/.local/bin/toastback by its full path (services don't get your shell's PATH). WSL sets
WSL_DISTRO_NAME only for processes it starts itself, so the shim takes the distro name from wslpath -w /
instead. Callbacks still run in the right distro, as the service's user, from the service's working directory.
# ~/.config/systemd/user/updates-check.service
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'n=$(dnf -q check-update | grep -c .); [ "$n" -eq 0 ] || \
%h/.local/bin/toastback -t "Updates available" -m "$n packages can be upgraded"'install also writes ~/.local/bin/notify-send next to the shim, so scripts and programs that call notify-send show
Windows toasts unchanged. It runs toastback notify-send, which takes libnotify's notify-send command line:
notify-send "Backup finished" "42 GB in 12 min"
notify-send -u critical -i dialog-error "Build failed" "<b>3</b> tests failed"
id=$(notify-send -p "Copying…") && notify-send -r "$id" "Copy done"install leaves a ~/.local/bin/notify-send that isn't toastback's alone, with a note. install --no-notify-send
removes the wrapper and keeps it off in later installs and upgrades; install --notify-send brings it back.
~/.local/bin has to come before /usr/bin on PATH (toastback doctor checks it). An alias isn't enough, because
scripts don't read your shell's aliases. A shell that was open during the install may remember the old notify-send
(command -v notify-send still shows /usr/bin/notify-send): run hash -r (zsh: rehash) or open a new terminal.
Scripts and new shells look it up afresh. Not covered: systemd services (their PATH has no ~/.local/bin), programs
that run /usr/bin/notify-send by its full path, and programs that send notifications over D-Bus themselves.
| notify-send | In toastback |
|---|---|
SUMMARY [BODY] |
title and body. The body's \n and other escapes are applied, its markup (<b>, <i>, <a href>, …) is removed and entities such as & are decoded |
-u low, normal, critical |
a silent toast; a toast; the urgent scenario with a Dismiss button (Windows 11 asks once whether to allow urgent toasts) |
-i ICON, -n ICON, hint image-path |
a PNG or JPG path or file:// URI, or dialog-information, dialog-warning, dialog-error and dialog-question as the built-in icons. Other icon names, and images that can't be read, are left out |
-a APP_NAME |
the attribution line |
-e, hint transient |
the toast leaves the notification center after about 10 seconds |
-p, -r ID |
print the notification's id (a number); replace the notification with that id |
hints x-canonical-private-synchronous, x-dunst-stack-tag, synchronous |
a toast with the same tag replaces the previous one (volume and brightness scripts) |
hint suppress-sound |
a silent toast |
hint int:value:N |
a progress bar at N % (0 to 100). With a stack tag or -r, a new value moves the shown toast's bar in place (volume and brightness scripts); a changed text or icon shows a new toast |
-t 0, -t over 10000 |
a long banner (about 25 s) |
-A [NAME=]Text |
a button (at most 5); implies -w. The chosen action's NAME is printed (an unnamed one's number, from 1). NAME default is a click on the toast's text |
-w |
wait until the toast is clicked or dismissed; -t MS limits the wait ("Wait timeout expired") |
--id-fd, --selected-action-fd |
also write the id or the chosen action to that file descriptor (through the wrapper) |
-c, --activation-token-fd, other hints |
accepted and ignored. Other -t values without a wait too: Windows decides how long a short banner stays |
Errors exit 1, and a wait exits 0 however it ends, as in notify-send. Ctrl-C during a wait removes the toast.
notify-send --version prints notify-send 0.8.9 (toastback X.Y.Z): the libnotify
version whose command line it follows. In toastback log, these notifications have ids ns-<number>. From
PowerShell or cmd: toastback-cli notify-send ….
toastback skill prints a skill for coding agents such as Claude Code and Codex: a SKILL.md that says when to use
--wait, update or notify-send, how a spec is built, what the exit codes mean and which mistakes to avoid. It's
built into the exe, so it always matches the installed version.
toastback install --skill writes it to ~/.claude/skills/toastback/SKILL.md in each distro that gets the shim,
where Claude Code finds it. The choice is remembered: later installs and upgrades rewrite it for the new version.
install --no-skill removes it, and uninstall does too. A SKILL.md there that isn't toastback's is left alone. For
another agent, save it where that agent reads skills: toastback skill > <dir>/toastback/SKILL.md.
Toasts need a user session: set the task to Run only when user is logged on (not "whether user is logged
on or not", which runs in session 0 where toasts can't be shown). Action: program
%LOCALAPPDATA%\toastback\bin\toastback.exe, arguments C:\specs\backup-check.json. The GUI exe opens no
console window.
Unknown fields are errors, so typos don't go unnoticed. Each notification handles one click: the toast is
removed, and later clicks (also while its callback still runs) are ignored and logged. Windows keeps a toast in
the notification center for 3 days at most, so a longer expires only matters for dialogs. A choice in a dialog
that opened before expires still counts for up to a day after it. Ids that Windows
reserves as device names (CON, NUL, COM1, …) are refused.
Built-in icons: icon can name one instead of an image file: info, warning, error or question (exact
lowercase; for a file called warning, write ./warning). Toasts show toastback's own PNG of it as the logo, and
dialogs show the Windows icon. From the command line: toastback -i error -t "Build failed".
Exactly one of:
| Form | Runs |
|---|---|
{"wsl": "string"} |
wsl.exe -d <distro> -u <user> --cd <cwd> --exec … running bash -lc "<string>", or sh -lc "<string>" in a distro without bash: your login profile, so your PATH |
{"wsl": ["argv", …]} |
the argv directly, no shell (and no login profile) |
{"cmd": "string"} |
cmd.exe /d /s /c "<string>" |
{"pwsh": "string"} |
PowerShell 7 (pwsh), else Windows PowerShell, via -EncodedCommand (no quoting issues) |
{"exe": ["C:\\path\\x.exe", "arg"]} |
the program directly (a Windows or WSL path, or a name on the Windows PATH) |
{"open": "url-or-path"} |
the default app for a URL, file or folder, by Windows or WSL path (Windows %VAR%s like %USERPROFILE% are expanded in paths, not in URLs) |
Plus optional modifiers: "cwd", "env": {}, "distro", "user" (override the context) and "timeout": "5m"
(the callback, and everything it started, is killed after it; processes detached on purpose with nohup or
setsid in WSL survive). Windows-side callbacks run in your profile folder unless cwd is set. A relative cwd is
resolved against the directory you ran toastback in (from cmd or PowerShell: for Windows-side callbacks only),
and ~ means your home directory in wsl callbacks only. cmd (and an exe that is a .bat or .cmd script)
can't run in a WSL directory outside /mnt/<drive> (cmd.exe refuses UNC paths), so toastback rejects that spec;
use pwsh. In exe and open, a path starting with /, ./ or ../ is a WSL path, resolved like cwd; a bare name
like notes.txt is left to Windows, so set cwd if it's a file.
A distro other than yours runs as that distro's default user in its home directory, unless user/cwd say
otherwise (also when the spec's context names another distro). The log records each callback's command and the
names of its env variables, not their values. The values stay in plain text in
%LOCALAPPDATA%\toastback\pending until the notification is clicked or expires, so prefer short-lived tokens.
A program a callback leaves running in the background (start /b server.exe, Start-Process -NoNewWindow,
server &) should send its output elsewhere (> server.log 2>&1): toastback reads the callback's output only until
2 seconds after the callback itself exits, and a program still writing to it afterwards may get "broken pipe"
errors.
Callbacks get TOASTBACK_ID, TOASTBACK_ACTION (the button id, or __body), TOASTBACK_TITLE and
TOASTBACK_DATA (the data JSON) as environment variables. For WSL callbacks they (and env) are passed
through WSLENV. toastback never pastes anything from the notification into a command line.
Don't let your command re-parse untrusted text. If a title, data or env value can come from text you
don't control (a script's output, an issue title, a file name), keep it a value, not code:
cmd: avoid%TOASTBACK_TITLE%,%TOASTBACK_DATA%and%VAR%s fromenv. cmd expands%VAR%before it parses&,|,>and the rest, so a title likex & del …runs the second command.%TOASTBACK_ID%and%TOASTBACK_ACTION%are safe (letters, digits,._-only). Usepwshorexeto work with other values.wsl(bash): quote expansions,"$TOASTBACK_TITLE", and never pass them toeval,bash -cor similar.pwsh:$env:TOASTBACK_TITLEis just a string. Don't hand it toInvoke-Expression.
toastback examples lists the built-in examples, ready to copy and adapt: simple, warning (built-in icons),
build (open the log, re-run, replace by id), deploy (details, data, a WSL callback), export (Windows-side
callbacks), progress (a progress bar to move with update), reboot-dialog (dialog mode) and alarm. Print one with toastback examples NAME > my.json, or show
it with toastback examples NAME | toastback. Callback output doesn't appear anywhere on screen: read it with
toastback log, or set notify_on_success.
examples/ holds the same specs plus a few that need the repository or cover single features:
images, default-handler, feedback (done/failed toasts), wsl-options (argv, env, cwd, timeout) and
windows-callbacks (cmd, PowerShell, exe, open). Run them from the repository root: just demo, or
toastback examples/<name>.json.
- Images: local PNG or JPG files (WSL or Windows paths). Keep them small, under about 200 KB and 1024 px: Windows silently drops images it considers too large.
- No dismiss callback. Once
toastbackhas exited, Windows tells nobody when a toast is dismissed or times out. Only clicks run callbacks;--waitreports a dismissal (exit 5), but runs nothing for it. - Focus assist / Do not disturb hides toast banners (they still land in the notification center). Use
"mode": "dialog"or"scenario": "alarm"for prompts that must be seen. - Urgent toasts (
"scenario": "urgent",notify-send -u critical): the first one makes Windows 11 ask whether toastback may show important notifications. Your answer stays in toastback's notification settings, where you can change it. - Buttons in the notification center appear once you expand the notification.
- Toasts can't be shown from session 0 (services, scheduled tasks that run "whether user is logged on or not").
- The first WSL callback after the distro has stopped takes a few seconds while WSL starts.
- Distros without bash (Alpine):
install.sh(which useswgetif there's nocurl) and thetoastbackcommand need only POSIXsh, whatever your interactive shell is. A{"wsl": "string"}callback runs inshthere, so a string that relies on bash-only features, such as arrays, can fail. - toastback isn't code-signed (a deliberate choice, see ADR 0010).
With Windows 11's Smart App Control turned on, Windows may block unsigned apps it doesn't know yet ("An
Application Control policy has blocked this file";
install.shreports it). Smart App Control has no per-app exceptions. Without it, a browser download may still trigger SmartScreen on first run.installwrites a fresh copy, so clicks don't trigger "downloaded from the internet" prompts;install.shdownloads with curl or wget, which set no download marker at all. - Dialogs show only the built-in icons (
info,warning,error,question), not an image file. With an imageiconor none, a dialog shows the warning icon foralarm/urgentand the information icon otherwise.
toastback doctorchecks the install, the protocol registration, whether notifications are enabled for toastback and whether your WSL shim is current.toastback logshows every click and callback, including stdout/stderr (last 8 KB each). The raw log is%LOCALAPPDATA%\toastback\log\toastback.jsonl.uninstallwarns when a callback or dialog is still running from the install folder. Those files stay until it exits; the warning prints the command that removes the rest.- A click that seems to do nothing: check
toastback log. A button with norunand nodefaultonly closes the toast; this is by design. The click is still logged (activated), and--waitreports it.
Built in WSL for x86_64-pc-windows-msvc with cargo-xwin; the prerequisites are in
docs/dev-setup.md. just lists the recipes:
| Recipe | |
|---|---|
just build |
release build of both exes |
just check |
rustfmt, clippy (Windows target, warnings as errors), then every linter (just lint) |
just tools / just hooks |
check the development tools / install the git hooks |
just test |
unit tests on Linux and on Windows (through WSL interop), then validate on every example |
just install |
build and install for the current distro and on the Windows PATH |
just demo / just log / just doctor |
show every example / recent events / check the install |
just bump X.Y.Z / just release X.Y.Z |
release: open the version-bump PR / after merging it, tag and publish |
just winget-setup / just winget-test |
winget: check the tools / install this build through winget, check it and uninstall it |
just winget-manifest X.Y.Z / just winget-test-release X.Y.Z |
winget: validate a release's manifest / run the same test with it |
just winget-submit X.Y.Z / just winget-update X.Y.Z |
winget: open the first winget-pkgs PR / the PR for a later version |
just scoop-setup / just scoop-test |
Scoop: check it works from WSL / install this build through Scoop, update it and uninstall it |
just scoop-manifest X.Y.Z |
Scoop: render a release's manifest for the bucket and check it against Scoop's schema |
Design notes and decisions are in docs/adr/; the manual test checklist is docs/manual-test.md.
Issues and pull requests are welcome: see CONTRIBUTING.md. Contributions are licensed under the project's GPL-3.0-or-later; there's no contributor agreement to sign. Security problems: see SECURITY.md. Questions: SUPPORT.md.
GPL-3.0-or-later. See LICENSE.
{ "id": "deploy-1234", // optional: generated if absent ([A-Za-z0-9._-], max 64, no leading -) "mode": "toast", // toast | dialog "title": "Deploy to production?", // required "body": "Build 1234 passed all checks.", "details": "Long text…", // shown in a dialog when the toast body is clicked "icon": "/home/g/icons/rocket.png", // info | warning | error | question, or a PNG/JPG, WSL or Windows path (copied to a cache) "image": null, // larger inline image "attribution": "CI", // small grey line "scenario": "default", // default | reminder | alarm | urgent (reminder/alarm stay on screen; need a button) "sound": "default", // default | silent | alarm | reminder "duration": "short", // banner: short (Windows' setting, 5 s by default) | long (about 25 s) "progress": { "value": 0.4, "status": "Copying…", "title": "backup.tar", "label": "4 of 10" }, // toasts only: value 0-1 or "indeterminate"; title, label optional; see `update` "expires": "3d", // how long it stays clickable: s, m, h, d (e.g. 1h30m). Default 3d (toast), 7d (dialog) "on_click": "details", // body click: details | default | none (default: details if set, else default) "buttons": [ // up to 5 { "id": "deploy", "label": "Deploy", "style": "success", // style: success | critical (Windows 11) "run": { "wsl": "./scripts/deploy.sh --env prod" } }, { "id": "later", "label": "Not now" } // no run: uses "default", else just closes ], "default": { "wsl": "echo \"$TOASTBACK_ACTION\" >> ~/clicks.log" }, // handler for buttons without run "data": { "build": 1234 }, // any JSON, passed to callbacks as TOASTBACK_DATA "notify_on_error": true, // "failed" toast when a callback fails (default: true) "notify_on_success": false, // "done" toast when it succeeds (default: false) "context": { "distro": "Ubuntu-24.04", "user": "g", "cwd": "/home/g/app" } // normally filled by the shim }