Commit graph

8 commits

Author SHA1 Message Date
f32bf5495b adding name option 2026-02-15 10:11:26 -07:00
308f9e6b11 adding FAQ with -f/-c 2026-02-15 01:21:27 -07:00
558d4046cd adding demo gifs 2026-02-15 00:58:11 -07:00
8319924139 Rename pause/resume to disable/enable to align with systemd terminology
-P/-R flags become -D/-E, -E (edit) becomes -e. Functions renamed to
disable_job_by_id/enable_job_by_id. Output messages, docs, tests, and
demo tapes updated accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 00:41:21 -07:00
8781ac9f2f Refactor: deduplicate notifications, fix timer parsing, -o optional arg
- Extract build_job_list helper (shared by show_status/list_logs)
- clean_jobs now calls remove_job instead of inline stop/disable/rm
- Extract status preamble in write_notify_lines (icon_pre/status_pre)
- Replace fragile list-timers tail/awk with systemctl show properties
- Combine consecutive sed -i calls into single invocations
- Simplify is_manage_mode check to use existing manage_count
- Make -o accept optional line count arg (-o 20 or just -o for default 10)
- Fix %%s escaping in unit files and document in CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:49:18 -07:00
67528374cd Add -o flag to include job output in notifications
Fetches the last N lines of journal output (default 10) via
journalctl and includes them in desktop/email notification bodies.
Supports CLI (-o 5) and edit mode (o or o=5 flag syntax).

Also fixes systemd %s specifier expansion in email printf format
strings (must use %%s so systemd passes %s through to the shell).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 16:35:52 -07:00
ef442d464c Add status-aware notifications, edit mode flags, job ID filtering
Notifications now use ExecStopPost (fires on success and failure) with
status-aware icons/messages instead of ExecStartPost (success only).
Desktop uses dialog-information/dialog-error, email uses sendmail.
Flags (i, e=addr) are persisted as # SYSTAB_FLAGS= comments in service
files and exposed in edit mode via ID:flags syntax. Edit mode validates
schedules before applying (re-edit loop like crontab -e). -S and -L
accept an optional job ID to filter to a single job. Extract trim()
helper to replace inline whitespace-stripping idiom.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 14:43:06 -07:00
37efa43d0a first functional commit 2026-02-14 11:34:00 -07:00