nag/README.md

5.4 KiB

nag, a bash script for setting one-off or repeating alarms

Usage:
  nag                                     list all alarms
  nag <time> <message...>                 one-shot alarm
  nag every <rules> <time> <message...>   repeating alarm
  nag stop <id>                           delete alarm
  nag skip <id>                           skip next occurrence
  nag tag <id> <tags...>                  add tags to an alarm
  nag tag <tag>                           list alarms with a tag
  nag untag <id> <tags...>                remove tags from an alarm
  nag check                               check and fire due alarms
  nag mute                                mute alarm sounds
  nag unmute                              unmute alarm sounds
  nag edit                                edit alarms file directly
  nag help [<subcommand>]                 show help
  nag version                             show version

Options:
  -e  Edit alarms file directly.
  -f  Skip all prompts.
  -v  Show version.

Environment:
  NAG_DIR    Alarm storage directory (default: ~/.local/share/nag)
  NAG_CMD    Notification command (default: notify-send)
  NAG_SOUND  Sound file to play (default: freedesktop bell sound)

Help

list · at · every · stop · skip · tag · untag · check · mute · unmute · edit · help · version

nag list

Usage:
  nag list

Description:
  List all alarms. This is the default when no subcommand is given.

nag at

Usage:
  nag [at] <time> <message...>

Description:
  Create a one-shot alarm. The "at" is optional. If the first argument
  doesn't match any other subcommand of nag, it'll fallback to "at".

Examples:
  nag 3pm take a break
  nag at 3pm take a break
  nag "tomorrow 9am" dentist appointment

nag every

Usage:
  nag every <rules> <time> <message...>

Description:
  Create a repeating alarm. Rules are comma-separated and case-insensitive.

Rules (and aliases):
  hour    (h, hourly)    monday    (mon, mondays)
  day     (d, daily)     tuesday   (tue, tuesdays)
  week    (weekly)       wednesday (wed, wednesdays)
  month   (monthly)      thursday  (thurs, thursdays)
  year    (yearly)       friday    (fri, fridays)
  weekday (weekdays)     saturday  (sat, saturdays)
  weekend (weekends)     sunday    (sun, sundays)

Examples:
  nag every weekday 9am standup meeting
  nag every tue,thu 3pm team sync
  nag every year "December 25" Christmas

nag stop

Usage:
  nag stop <id>

Description:
  Stop an alarm by ID.

nag skip

Usage:
  nag skip <id>

Description:
  Skip the next occurrence of a repeating alarm (reschedule without firing).
  For one-shot alarms, this deletes them.

nag tag

Usage:
  nag tag <id> <tags...>    add tags to an alarm
  nag tag <tag>             list alarms with a tag

Description:
  Add tags to an alarm by ID, or list all alarms matching a tag.
  Tags must not be pure integers.

nag untag

Usage:
  nag untag <id> <tags...>

Description:
  Remove one or more tags from an alarm.

nag check

Usage:
  nag check

Description:
  Check for due alarms and fire them. Run automatically by a systemd
  timer (every 15s) or cron (every 60s). Repeating alarms are
  rescheduled. One-shot alarms are removed. Stale alarms older than
  15 minutes are silently dropped or rescheduled without firing.

nag mute

Usage:
  nag mute

Description:
  Mute alarm sounds. Notifications still fire, but no sound is played.

nag unmute

Usage:
  nag unmute

Description:
  Unmute alarm sounds.

nag edit

Usage:
  nag ( edit | -e )

Description:
  Open the alarms file in $EDITOR (falls back to $VISUAL, then vi).

nag help

Usage:
  nag help [<subcommand>]

Description:
  Display help information for nag or a specified subcommand.

nag version

Usage:
  nag ( version | -v )

Description:
  Display the current program version.

License

MIT - see LICENSE.