2026-02-14 22:24:06 -07:00
|
|
|
# systab — Edit Mode with Notification Flags
|
|
|
|
|
# Demonstrates the crontab-style editor with :flags syntax.
|
|
|
|
|
|
|
|
|
|
Output demo/editmode.gif
|
|
|
|
|
Set Shell bash
|
|
|
|
|
Set Width 1200
|
|
|
|
|
Set Height 600
|
|
|
|
|
Set FontSize 16
|
|
|
|
|
|
|
|
|
|
Set TypingSpeed 50ms
|
|
|
|
|
|
|
|
|
|
Sleep 1s
|
|
|
|
|
|
|
|
|
|
# First create some jobs to edit
|
2026-02-15 00:12:42 -07:00
|
|
|
Hide
|
|
|
|
|
Type "./demo/note.sh 'Creating some jobs to work with'"
|
2026-02-14 22:24:06 -07:00
|
|
|
Enter
|
|
|
|
|
Sleep 500ms
|
2026-02-15 00:12:42 -07:00
|
|
|
Show
|
|
|
|
|
Sleep 1s
|
2026-02-14 22:24:06 -07:00
|
|
|
Type "systab -t 'every 5 minutes' -c 'echo ping'"
|
|
|
|
|
Enter
|
|
|
|
|
Sleep 2s
|
|
|
|
|
Type "systab -t daily -c '/home/user/backup.sh' -i"
|
|
|
|
|
Enter
|
|
|
|
|
Sleep 2s
|
|
|
|
|
|
|
|
|
|
# Open edit mode with EDITOR=nano for visibility
|
2026-02-15 00:12:42 -07:00
|
|
|
Hide
|
|
|
|
|
Type "./demo/note.sh 'Opening edit mode — add notifications, create and modify jobs'"
|
2026-02-14 22:24:06 -07:00
|
|
|
Enter
|
2026-02-15 00:12:42 -07:00
|
|
|
Sleep 500ms
|
|
|
|
|
Show
|
2026-02-14 22:24:06 -07:00
|
|
|
Sleep 1s
|
|
|
|
|
Type "EDITOR=nano systab -E"
|
|
|
|
|
Sleep 500ms
|
|
|
|
|
Enter
|
|
|
|
|
Sleep 3s
|
|
|
|
|
|
|
|
|
|
# In nano: navigate to the end of the file
|
|
|
|
|
# Ctrl+V = page down in nano, then Down to reach last line
|
|
|
|
|
Ctrl+V
|
|
|
|
|
Sleep 500ms
|
|
|
|
|
Down 5
|
|
|
|
|
Sleep 500ms
|
|
|
|
|
|
|
|
|
|
# Add a new job line with notification flags
|
|
|
|
|
Type "new:i,e=admin@example.com | hourly | curl -s https://example.com/health"
|
|
|
|
|
Sleep 1s
|
|
|
|
|
Enter
|
|
|
|
|
|
|
|
|
|
Sleep 1s
|
|
|
|
|
|
|
|
|
|
# Save and exit nano
|
|
|
|
|
Ctrl+O
|
|
|
|
|
Sleep 500ms
|
|
|
|
|
Enter
|
|
|
|
|
Sleep 500ms
|
|
|
|
|
Ctrl+X
|
|
|
|
|
Sleep 3s
|
|
|
|
|
|
|
|
|
|
# Show the result
|
2026-02-15 00:12:42 -07:00
|
|
|
Hide
|
|
|
|
|
Type "./demo/note.sh 'Changes applied — checking status'"
|
2026-02-14 22:24:06 -07:00
|
|
|
Enter
|
|
|
|
|
Sleep 500ms
|
2026-02-15 00:12:42 -07:00
|
|
|
Show
|
|
|
|
|
Sleep 1s
|
|
|
|
|
Type "systab -S | less"
|
2026-02-14 22:24:06 -07:00
|
|
|
Sleep 500ms
|
|
|
|
|
Enter
|
2026-02-15 00:12:42 -07:00
|
|
|
Sleep 2s
|
|
|
|
|
Type "/Job:"
|
|
|
|
|
Enter
|
|
|
|
|
Sleep 3s
|
|
|
|
|
Type "q"
|
|
|
|
|
Sleep 1s
|
2026-02-14 22:24:06 -07:00
|
|
|
|
|
|
|
|
# Re-open edit mode to show flags are persisted
|
2026-02-15 00:12:42 -07:00
|
|
|
Hide
|
|
|
|
|
Type "./demo/note.sh 'Re-opening edit mode — flags are persisted'"
|
2026-02-14 22:24:06 -07:00
|
|
|
Enter
|
2026-02-15 00:12:42 -07:00
|
|
|
Sleep 500ms
|
|
|
|
|
Show
|
2026-02-14 22:24:06 -07:00
|
|
|
Sleep 1s
|
|
|
|
|
Type "EDITOR=nano systab -E"
|
|
|
|
|
Sleep 500ms
|
|
|
|
|
Enter
|
|
|
|
|
Sleep 3s
|
|
|
|
|
|
|
|
|
|
# Just view and exit without changes
|
|
|
|
|
Ctrl+X
|
|
|
|
|
Sleep 2s
|
|
|
|
|
|
|
|
|
|
Sleep 2s
|