System Triggers

Desktop-only strategy!

Mark avatar
Written by Mark
Updated over a week ago

System Triggers let you run programs or execute commands on your computer when you create a task, complete a task, start a timer, etc. This can be used to interface with other programs or automate your workflow.

First, open your Marvin desktop app, then turn on the System Triggers strategy and open its settings. Here you will find a list of Triggers (triggers which haven't been configured yet are shown in gray):

Click on a Trigger to edit the command that will be run when the corresponding action takes place. For example, if you want to play a sound clip when it's time for a break, click the Break Timer Started to expand it:

then type "afplay path_to_sound_file":

As soon as you click outside the box, the trigger is saved. But there's an extra step to get this working!

It may seem like a pain, but for security purposes a second step done outside Marvin is required to get system triggers fully setup. First click to copy the triggers as text to your clipboard, then click to open the app dir. You'll need to edit triggers.json and replace the entire content of the file with the text in your clipboard. You can use a text editor like Notepad on Windows, on macos, or Gedit on Linux.

Real world examples


(macos, linux): If you get an EACCES error:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: spawn /Path/to/my/ EACCES
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

then probably the problem is that your script is not executable! Try running chmod 755 /Path/to/my/ to make it readable and executable (and writeable by you).

Did this answer your question?