2024-05-20 Org-clockify

A long time ago I mentioned that we use Toggl in the company I work for. Being the (sole) Emacs user in the company, I (of course) use Org mode clocking features, so I wrote a simple integration for Toggl.

In the last few weeks, I played around with another time-tracking tool, Clockify. (Don’t get me started on the name, which is horrible to search for.) Of course, again I decided that I need to bridge the gap between Org mode and Clockify, and a simple global minor mode was born. It is rather bare-bones, but this is exactly what I needed. Feel free to expand it if your needs are greater.

To set Org-clockify up, you need to set org-clockify-api-key to the API key you can get from the web app. (There are a few more variables available, but you probably don’t need to bother with those. Customize the “Org Clockify” group to see all of them.)

When you say M-x org-clockify-mode, every time you stop an Org clock, assuming the headline clocked has a Clockify project associated with it (see below for how to do that), it will be submitted to Clockify. You don’t have to do anything else!

The mode has three commands in addition to the mode switching command. org-clockify-set-workspace shows a list of workspaces and lets the user select one as the default workspace. With a prefix argument, it downloads the list of available workspaces from the server first. Alternatively, you may customize the option org-clockify-workspace-id (which is what org-clockify-set-workspace sets internally). The assumption here is that you don’t switch workspaces – you set the workspace once and use it.

In a similar vein, org-clockify-set-project lets you choose the project from the default workspace. That project’s data are then put into Org properties of the current headline. The idea is that you can create an Org headline corresponding to a task, and use org-clockify-set-project to associate that task with a project.

The third command is org-clockify-submit-time-entry-at-point. It does exactly what it says on the tin, and lets you submit a time entry you clocked outside Org Clockify mode.

Happy clocking!

CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryOrgMode