Minimalist Habit Tracker Template for Obsidian
Published May 12th, 2022
In Obsidian, there are usually many different ways to implement a feature that you would like to have in your vault. Habit tracking is a way to help you track and implement habits in your daily life.
If you are already creating daily notes in Obsidian, via the Daily Notes core plugin or the Periodic Notes community plugin, it makes sense to track your habits here as well. In order to accomplish this, we can leverage the power of Dataview and templates to create a minimal dashboard for tracking our habit’s progress for the week.
Moving forward, I will assume you have Periodic Notes or Daily Notes plugin enabled and configured with a template. You do not have to use the Templater community plugin, the Templates core plugin will work as well. I will be using Templater in the examples below, but you can sub out any of the special syntax for Obsidian Templates equivalent.
Daily Note Template
Here is an example daily note template with Templater, which includes the habits we want to track:
# [[<% tp.file.title %>|<% moment(tp.file.title).format("MMMM Do, YYYY") %>]] [[<% tp.date.yesterday("YYYY-MM-DD") %>]] | [[<% tp.date.tomorrow("YYYY-MM-DD") %>]] ## Habits **Reading**:: **Sleep**:: 0 **Exercise**:: 0 **Highlights**:: 0 **Mindfulness**:: 0 ## Notes
We will use this template for our daily notes. Whenever we create a new daily note, we can fill in the values for our habits. An example of a daily note with the habits filled in:
Now we can create a minimal dashboard to track our habits throughout the week. Make sure Dataview is enabled and create a new note for your dashboard with the following:
TABLE WITHOUT ID file.link as Date, choice(exercise > 30, "✅", "❌") as Exercise, choice(sleep > 6, "✅", "❌") as Sleep, choice(highlights >= 3, "✅", "❌") as Highlights, choice(mindfulness > 10, "✅", "❌") as Mindfulness, reading as Reading FROM "daily" WHERE file.day <= date(now) AND file.day >= date(now) - dur(7days) SORT file.day ASC
FROM "daily" determines which pages are collected and displayed. In this case, we are only collecting notes in the
daily folder. You can select based on other sources like tags and links. Refer to the Dataview FROM documentation for more information.
After we accumulate more daily notes, our dashboard will look something like:
This is my preferred method for creating a habit tracking dashboard, but as I said in the beginning, there are multiple ways of accomplishing this behavior.
You can extend this pattern to create dashboards for other features, such as: mood tracking, reading list, journaling, etc.
Let me know what you come up with on Twitter!
Thanks for reading! You can discuss this post using one of the links below. Additionally, it would mean a lot if you shared this post with others!