URL Scheme

Clepsydra extensively supports URL schemes.
All URL schemes obey either one of these formats:

  • clepsydra://[action]?[arguments]
  • clepsydra://x-callback-url/[action]?[arguments]

The [action] can be one of the following:

  • start
  • stop
  • pause
  • toggle
  • edit
  • delete
  • bigview
  • bigviewandstart

All these actions take the same arguments. Either name with the value of the timer’s name to act upon or index, the index of the timer on the list (the top-most timer is at index 0).

So, for example, here’s an URL that will start and show the big view for the second timer: clepsydra://bigviewandstart?index=1

There’s also one last action, new, that takes very different arguments. The arguments for this action are:

  • name
  • hours
  • minutes
  • seconds
  • sound: the index for the sound
    • -2      no sound
    • -1      default system sound
    • >=0      the index of the sound as seen on the sound selection view (first custom sound is index 0)
  • showintodayview
    • 0      don’t show
    • 1      show
  • countingmode
    • 0      up
    • 1      down
  • action
    • edit      edit the timer
    • start      start the timer after adding it
    • bigview      show the big view for the timer after adding it

None of the arguments for new are necessary. If an argument is not given, the default value will be used instead.

If the url is of the format:

  • clepsydra://x-callback-url/[action]?[arguments]

then, for any action, the following arguments are also accepted:

  • x-success
  • x-cancel

These arguments should contain other URLs to be called upon success or cancellation. For example, when the action is edit or new, if the user saves the timer, the URL for x-success will be called, but if the user cancels the editing, x-cancel will be called instead.

All actions except for edit and new only call x-success.