ding-cli

⏱ Usage

How to set a timer, the accepted time formats, foreground and detached modes, the wizard and icon sets.

ding <time> [message] [options]

time is required unless you want the wizard. message is the notification body and defaults to ⏰ Time's up.

Time formats

FormatExampleFires
Hours5h5 hours from now
Minutes90m90 minutes from now
Seconds30s30 seconds from now
Compound1h30m1 hour 30 minutes from now
Bare number4545 minutes from now
24-hour clock14:30at 14:30, or tomorrow if that has passed
12-hour clock2:30pmat 14:30
Hour only9amat 09:00, or tomorrow if that has passed

Clock times also accept seconds (14:30:15). Anything ding cannot parse prints an error and exits with status 1, as does a zero duration.

Foreground mode

By default ding prints the fire time and shows a live countdown.

$ ding 90m "tea is ready"
ding β†’ 16:37:22 Β· tea is ready
01:29:58 β–Έ tea is ready

When the timer fires, the notification appears and the alarm loops until you press any key. Ctrl+C at any point cancels the timer and exits cleanly.

Detached mode

--detach (-d) hands the timer to a background process and returns your prompt straight away. No terminal needs to stay open.

$ ding 5h "quota is back" --detach
ding β†’ 21:00:00 (detached)
$

A detached run fires the notification and alarm on its own. Combine it with --no-notify and --exec for a silent fire-and-forget command (see Running commands).

Interactive wizard

Run ding with no time, or pass -i / --interactive, to open a tabbed wizard:

ding  When Β· Message Β· Sound Β· Notify Β· Mode Β· Review
StepWhat you choose
WhenAny time format from the table above
MessageThe notification body
SoundOff, an alarm preset, a Clock ringtone or a system sound
NotifyWhether to send a desktop notification
ModeForeground or detached
ReviewConfirm with ↡, or go back to change anything

Move between tabs with ← / β†’ (or Tab / Shift+Tab). On the Sound step, ↑ / ↓ browse the list and Space previews the highlighted sound before you confirm with ↡.

The wizard only collects the six answers above. Flags such as --title, --subtitle, --open or --sound are not applied to a wizard run; --icons, --exec and --exec-fail-sound are.

Icon sets

The countdown and the fired state draw glyphs from one of three sets.

ModeActivateNeeds
nerddefaulta Nerd Font-patched terminal
emoji--icons emoji or DING_ICONS=emojiany modern terminal
ascii--icons ascii or DING_ICONS=asciinothing

--icons wins over DING_ICONS. If glyphs render as empty boxes, add export DING_ICONS=emoji to your shell profile.

Examples

# Relative timer with a message
ding 90m "tea is ready"

# Absolute time
ding 14:30 "stand-up"

# 9 am, rolling to tomorrow if it has passed
ding 9am

# Quietly background a timer
ding 30m "check the oven" --no-sound --detach