Skip to content

Tadam

Tadam is a macOS Pomodoro timer app. Protocol Launcher allows you to generate official URL scheme links for Tadam.

Usage

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

Notes

Tadam documents time using the same format as the app, with examples such as 10, 10:30, 1h, and 2h5min20sec. The official page also says open and mini are enabled when set to true or 1.

Tadam partially supports x-callback-url. Use the xCallback... helpers for the documented tadam://x-callback-url/ prefix, or pass xSuccess to the regular helpers when you need the documented x-success parameter. x-error and other x-callback-url parameters are not supported.

Start Work Timer

On-Demand
ts
import { startWork } from 'protocol-launcher/tadam'

const url = startWork({
  time: '10min',
})

Start Work Timer and Open UI

On-Demand
ts
import { startWork } from 'protocol-launcher/tadam'

const url = startWork({
  time: '5:30',
  open: true,
})

Start Break Timer

On-Demand
ts
import { startBreak } from 'protocol-launcher/tadam'

const url = startBreak({
  time: '5',
})

Start Break Timer in Mini UI

On-Demand
ts
import { startBreak } from 'protocol-launcher/tadam'

const url = startBreak({
  time: '10min',
  mini: true,
})

Control Timer

On-Demand
ts
import { pause, resume, stop } from 'protocol-launcher/tadam'

const pauseUrl = pause()
const resumeUrl = resume()
const stopUrl = stop()

Open Timer UI and Help

On-Demand
ts
import { help, startBreak, startWork } from 'protocol-launcher/tadam'

const startWorkUiUrl = startWork()
const breakUiUrl = startBreak()
const helpUrl = help()

x-callback-url

On-Demand
ts
import { xCallbackStartWork } from 'protocol-launcher/tadam'

const url = xCallbackStartWork({
  time: '10min',
})
On-Demand
ts
import { xCallbackPause } from 'protocol-launcher/tadam'

const url = xCallbackPause({
  xSuccess: 'shortcuts://callback',
})

Generated URLs

ts
startWork({ time: '10min' })
// => 'tadam://start?time=10min'

startWork({ time: '5:30', open: true })
// => 'tadam://start?time=5:30&open=true'

startBreak({ time: '5' })
// => 'tadam://break?time=5'

startBreak({ time: '10min', mini: true })
// => 'tadam://break?time=10min&mini=true'

pause()
// => 'tadam://pause'

resume()
// => 'tadam://resume'

stop()
// => 'tadam://stop'

help()
// => 'tadam://help'

xCallbackStartWork({ time: '10min' })
// => 'tadam://x-callback-url/start?time=10min'

xCallbackPause({ xSuccess: 'shortcuts://callback' })
// => 'tadam://x-callback-url/pause?x-success=shortcuts%3A%2F%2Fcallback'

Official Documentation