systab/demo/notifications.tape
Matthias Johnson 32ac2c3d5f Fix "in N minutes" parsing and VHS tape errors
- Strip "in " prefix before passing to date -d (was always broken)
- Fix quickstart tape: -B3 → -B4 for resume grep (Job: is 4 lines back)
- Fix notifications tape: -f ~/backup.sh → -c (file doesn't exist)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 22:24:06 -07:00

62 lines
1.1 KiB
VHS

# systab — Notifications
# Shows status-aware desktop and email notifications.
Output demo/notifications.gif
Set Shell bash
Set Width 1200
Set Height 600
Set FontSize 16
Set TypingSpeed 50ms
Sleep 1s
# Desktop notification — success case
Type "# Desktop notification on success/failure"
Enter
Sleep 1s
Type "systab -t 'in 1 minute' -c 'echo success' -i"
Sleep 500ms
Enter
Sleep 2s
# Desktop notification — failure case
Type "systab -t 'in 1 minute' -c 'exit 1' -i"
Sleep 500ms
Enter
Sleep 2s
# Email notification
Type "# Email notification via sendmail"
Enter
Sleep 1s
Type "systab -t 'in 1 minute' -c 'echo test' -m user@example.com"
Sleep 500ms
Enter
Sleep 2s
# Both notifications
Type "# Both desktop and email"
Enter
Sleep 1s
Type "systab -t 'every day at 9am' -c '/home/user/backup.sh' -i -m admin@example.com"
Sleep 500ms
Enter
Sleep 2s
# Show the generated service file to see ExecStopPost lines
Type "# Inspect generated service file"
Enter
Sleep 1s
Type "cat ~/.config/systemd/user/systab_*.service | head -20"
Sleep 500ms
Enter
Sleep 4s
# Check status
Type "systab -S"
Sleep 500ms
Enter
Sleep 3s
Sleep 2s