Timing's rules system is very powerful, but it can also be a bit overwhelming to beginners.
This article covers everything you need to know to create sophisticated rules.
Table of Contents
What are Rules?
Rules are Timing's way of automatically determining what projects and filters an app activity belongs to.
They are applied differently for projects and filters:
- Project rules are applied once a new app activity has been tracked:
After Timing has recorded a new app activity, it will go through all projects and check if the project's rule matches the app activity.
The app activity will then be assigned to the first project with a matching rule.
In particular, changing a project's rule does not affect any app activities tracked so far –
it will only apply to new app activities tracked from now on.
Have a look at What if an activity would match several rules? on how the order of project rules is determined.
- Filter rules are applied whenever they are selected:
When you select a filter in Timing's filter list, Timing will go through all app activities it is currently displaying and only keep the ones that match the filter's rules.
In particular, the filter's rule applies to all app activities Timing has tracked – not just new ones.
There are two main reasons why project rules can not be applied retroactively:
- Projects also let you manually re-assign past activities for refinement. This would be nearly impossible if those re-assignments conflicted with some rules.
- Activities can only be assigned to one project at a time, to make projects act as "buckets". This would be nearly impossible to realize if rules also applied retroactively.
Another big difference between projects and filters is that an activity can only be assigned to at most a single project, but multiple filters (i.e. filters can overlap).
See this article for details.
Note that rules always only apply to app activities, not time entries.
With that out of the way, how can we create or edit a project's (or filter's) rule?
The easiest way to add a rule is simply by dragging an element from the "Activities" screen onto the project/filter while keeping the ⌥ key pressed.
Often, simply adding a few file paths or domains as a rule will go a long way towards categorizing your activities.
In case you do need to add more complex rules or edit an existing one, double-click the project/filter to edit it, then click the triangle next to "Rule Editor":
Wow, quite a lot!
We'll now go through all possible rule types one by one.
At the root of a project's rule is always a compound rule.
Those rules consist of several sub-rules, and they match either when at least one (called "Any" in the rule editor) or all of their subrules match, depending on the rule type.
In most cases, the root rule will be of the "Any" type to allow matching by several different subrules.
If you need to create a nested sub-rule (e.g. title contains x AND title contains y), hold ⌥ pressed while clicking the + button.
In order to create a useful rule, compound rules are not enough.
We need to apply some criteria to one of the app activity's properties, after all!
To create good rules, we recommend using the "Activities" screen for reference, as it gives you the most comprehensive picture of what data your rules could match on.
Property rules consist of three parts:
- The property we want to match on. You can select one of the following:
- Keywords. These are all the keywords extracted from the app activity's title and path.
Note that keywords are always single lowercase words, so rules like Keywords contain 'foo bar' or Keywords contain 'Foo' will never match.
If you want to match multiple keywords, use a compound rule like this instead:
- Domain (e.g xyz.com). If the activity is about visiting a website, this is the website's domain.
E.g. for http://timingapp.com/xyz and https://timingapp.com/xyz this would be timingapp.com, while for http://www.timingapp.com/xyz it would be www.timingapp.com.
- Full Website URL. When visiting a website, the full website URL.
For e.g. https://www.timingapp.com/xyz?abc this would be the full https://www.timingapp.com/xyz?abc.
- File Path. When the activity is about viewing or editing a file, this contains the file's path in a normalized fashion, e.g. /Users/daniel/Documents/file.txt
- Title. The window title or document title Timing extracted for the app activity.
Depending on the app, this is often just the apps's name, the name of a screen in the app, or the name of the edited document.
- Path (File or URL). The path Timing extracted for the app activity.
This also depends on the app and often is a website URL or a file path (see above).
There are a few special cases – for example, in Mail.app the path represents the mailbox hierarchy the current email is in (which is neither a file path nor a URL, but still a kind of path).
The keywords, domain, full website URL or file path properties from above are more specific, so it is recommended to use those instead if possible.
- Title or Path. This rule can match either the title or the path.
This is useful if you want to match e.g. both the title and the path of an app activity, but don't want to create two separate rules for that.
- Application. The application you were using.
- Application Title. The title of the application you were using. If you are using multiple applications with the same name (e.g. both testing and production versions), this is useful to match all of them with just one rule.
- Device. The device this activity was recorded on. This is useful to restrict rules to apply on specific Macs only, or to create a filter that only shows the activities from one particular Mac.
- Keywords. These are all the keywords extracted from the app activity's title and path.
- The relation the property should have to the value we specify.
The possible relations depend on the property the rule is about – for keywords this can e.g. only be "contain", meaning that one of the app activity's keywords is the word in the text box on the right.
For string properties, this can be one of the following:
- is. The property must be identical to the string specified in the text box on the right.
- begins with. The property must begin with the string specified in the text box on the right.
- ends with. The property must end with the string specified in the text box on the right.
- contains. The property must contain the string specified in the text box on the right.
- is like. The property must match the string specified in the text box on the right.
? and * are allowed as wildcard characters, where ? matches exactly one character and * matches zero or more characters.
- is not. The property must not be identical to the string specified in the text box on the right.
Note that the "Domain" and "Application" properties also have a special "in" relation available. These are for use in the sample projects (to match e.g. the graphics editing applications Timing knows about) and are not recommended for your own use.
- The value the rule will be checking for.
In most cases this is simply a string as explained above, e.g. a domain like "timingapp.com".
For the "Application" property you can select which application the rule should match (or not match).
What if an activity would match several rules?
Speaking of conflicts – sometimes an activity might match more than rule.
In that case, Timing will associate the activity with the first matching project it finds.
To determine which rule comes first, there's a pane in Timing's preferences. It lets you change the order in which Timing applies rules: Newly created projects by default get the highest priority, so they will override the sample projects' rules.
Also, keep in mind that the order of rules that do not overlap does not make any difference; you only need to re-order rules that could match the same activity.
In addition, projects that do not contain any rules are not relevant for these checks, either. To that end, the preference pane includes a button to move all projects without rules to the bottom of the list, so you can focus on re-ordering only the relevant projects.
Re-applying project rules
Let's say, you are reviewing yesterday's data and notice that a couple of activities should always be assigned to the same project. Good thing that Timing supports rules to automate all these assignments in the future! But then you notice that the same kind of activities have already been recorded last week and last month. Now, repeating that same assignment again for all your past activities is no fun. That's where our feature to re-apply rules comes in: it re-applies all your project rules to a set of existing activities, saving you the work of assigning all these activities yourself.
You can activate this feature from the "Edit" menu or an individual project's context menu:
A couple additional notes on this feature:
- The rules will only be re-applied to all visible activities. If you to re-apply want them to more activities, simply discard your current filter and/or select a larger date range.
- When you apply a single project's rules, Timing will still evaluate all project rules. But it only changes the activity's project if there is no rule with a higher priority that also matches the same activity. This way, re-applying e.g. the fairly generic "Web Browsing" rule won't eliminate all your more specific assignments for individual websites.
- In a similar fashion, this feature will simply skip activities that do not match any rule. That way, we won't accidentally reset any project assignments you have made manually.
How can I assign all time spent in a particular folder to a specific project?
Simply drag the desired folder from the Finder onto your project in the Timing sidebar. Or, if Timing has already tracked time in this folder, drag the folder from Timing's "Activities" screen onto the project in the sidebar while keeping the ⌥ key pressed. Alternatively, you can also manually add a "File Path begins with" rule to the project yourself.
Afterwards, any future time spent on files in this folder or any of its subdirectories will automatically be assigned to this project.
How can I assign all time spent on a particular website to a specific project?
Simply drag the desired domain from Timing's "Activities" screen onto the project in the sidebar while keeping the ⌥ key pressed. Alternatively, you can also manually add a "Domain is" rule to the project yourself.
Afterwards, any future time spent on this domain will automatically be assigned to this project.
Can I automatically categorize all time spent reading emails from a particular address?
If you are using Mail.app, this is possible.
Timing categorizes time spent reading in Mail.app as "(Inbox Name) > (Email Folders) > (Sender Address) > (Subject)", and these show up on the "Activities" screen: You can ⌥-drag an individual email, sender or folder from there onto a project to create a rule.
If you'd like to see time spent on individual emails, we recommend searching for them on the "Activities" screen.
So if you create a "Path contains '[email protected]'", rule, Timing will automatically assign all time spent reading emails by [email protected] to the corresponding project.
If you would rather like to categorize time for all emails from e.g. xyz.com, use "Path contains '@xyz.com'" instead.
Please note that this only applies to time spent reading emails, as Mail.app does not provide this kind of information when writing an email.
While you write an email, Timing will simply track the new email's subject.
Can I automatically categorize all time spent in a particular Slack team?
Yes. Simply ⌥-drag the corresponding channel or team from the "Activities" screen onto the corresponding project. Alternatively, you can create a rule of the form "'Title' contains 'Slack - <YourSlackTeam>'".
If you'd like to see time spent on individual Slack teams, we recommend searching for them on the "Activities" screen.
Please note that Timing can't always detect individual channels/DMs inside a team, as Slack makes it very hard to extract that data.
Can I automatically categorize all time spent in a particular Chrome or Safari profile?
Yes. Google Chrome automatically appends your profile's name to the end of its window title. This means that you should be able to create a "'Window title' ends with <Profile Name>" rule in Timing to match browsing activity with the corresponding profile. For example, the following rule would match all time spent in a Chrome window with the profile name "Daniel (timingapp.com)":
Similarly, Safari 17 and newer automatically prepend your profile's name to the beginning of the window title. This means that you should be able to create a "'Window title' begins with <Profile Name>" rule in Timing to match browsing activity with the corresponding profile.
You can check yourself whether the profile name is included in your window title by searching Timing's "Activities" screen for "Chrome" or "Safari" and then looking at the titles displayed for the corresponding activities.
Can I use rules to only show times recorded on a particular Mac or iOS device?
Yes. If you e.g. have an iMac and a MacBook Pro and want to see only activities from your iMac, you could create a filter called "iMac". Then, in that filter's rule editor, create a "Device is" rule and select your iMac in the rule's dropdown list. Once you select that filter in the list, only activities recorded on your iMac will be shown.
By the way, if you'd like to give your devices more meaningful names, simply click the device's name in the legend to the left of the timeline, then enter the desired name.
I don't see a specific app in the app list. How can I add it?
Currently, the application rule list only contains any applications Timing has "seen" (i.e. tracked) before.
Simply open the app in question for a few seconds, switch to another app, click the Timing menu item (to update its database), then re-open the rule editor.
Alternatively, you can create an "Application Title contains" rule and enter the name of the desired application. This rule will then match any applications with that name, even if Timing has not recorded them before.
What are the contents of the predefined lists, e.g. "Social Media Applications" and "Social Media Websites"?
How can I edit them?
Currently, the contents of these lists are not visible or editable. However, the predefined lists are very short and not very interesting anyway, so we recommend not paying too much attention to them 😉 Also, you can view which apps/domains you used have been assigned to that project simply by selecting the corresponding project, then looking at what shows up for that project on the "Activities" screen.
Also, you can add extra apps or websites to the same project, which is essentially equivalent to adding them to those lists:
Simply option-drag the app or domain in question from the "Activities" screen onto your project, as described above.
If you are encountering an issue with rules not working as expected, that might have one of the following reasons:
- Rules apply only to future activities. See Re-applying project rules if you need to re-apply rules to past activities.
- Are there maybe other projects whose rules that take precedence over the desired project? Please see What if an activity would match several rules? for more information on that.
- Also note that it is often more accurate and convenient to create rules via drag-and-drop from the "Activities" screen rather than manually. Just drag an activity from the "Activities" screen while keeping the ⌥ key pressed to create a rule that will match all future activities of this kind to that project. You can verify whether a rule will be created by checking if the cursor shows a little "+" icon during the drag once the ⌥ key is pressed.
If any of the above explains the behavior you are seeing, feel free to let us know which one; maybe we can make that behavior more obvious to avoid confusion for other users in the future.
If all of this does not explain the issues you are seeing, we migth be able to take a look at your rule configuration. To do so, please send the following information via our support form:
- A full, uncropped screenshot of your "Activities" screen showing the activities that you expected to be categorized differently.
- A full, uncropped screenshot of a project editor with the rule editor expanded. To edit a project, you can simply double-click it. Note that you can also take screenshots from Timing's built-in support form.
- A full, uncropped screenshot of your "Rule Order" preferences.
- If applicable, a quick screencast video (can also be created via the built-in support form) demonstrating how you use drag-and-drop to create a rule. Please also attach another screenshot of the rule editor, showing that the rule has not been created. You might need to scroll to the bottom of the rule editor to find the rule that was supposed to be created.