demo.mp4
HabitDeck is a Hammerspoon Spoon that integrates with Beaver Habits and turns your Stream Deck into an interactive habit tracker. It displays the completion status of three configurable habits for the last five days on the Stream Deck buttons. Clicking a button toggles the completion status of the corresponding habit for that day, and the state is synchronized with Beaver Habits.
- Download and run Beaver Habits.
- Download and install Hammerspoon.
- Download and unzip
HabitDeck.spoon
and place it in~/.hammerspoon/Spoons/
. - Follow the Configuration section below.
Before starting HabitDeck, you need to configure it with your Beaver Habits credentials and the habits you want to track. An example of the configuration file located at ~/.hammerspoon/init.lua
is shown below:
local habitDeck = hs.loadSpoon("HabitDeck")
habitDeck:start({
endpoint = "http://localhost:7440",
username = "your_username",
password = "your_password",
habits = { "Read", "Meditate", "Journal" },
})
Make sure to replace the placeholders with your actual Beaver Habits endpoint, username, and password, and the names of the habits you want to track. The number of habits should match the number of rows on your Stream Deck model.
Note
This project has been tested on the Stream Deck (Original V2) model. If you have a different model, please share your experience so that I can update the compatibility information in the README.
Currently, the following models have been confirmed to work:
- Stream Deck (Original V2)
After reloading Hammerspoon, it will automatically connect to your Stream Deck and display the completion status of the configured habits for the last five days. Each button represents a day, with the rightmost button being the current day and the leftmost button being four days ago.
To mark a habit as complete for a specific day, simply click the corresponding button on the Stream Deck. The button will update with a checkmark icon to indicate that the habit is complete for that day. Clicking the button again will toggle the completion status back to incomplete.
Completion statuses are automatically synced with the Beaver Habits every 10 seconds in case they are changed by another client (e.g. the web UI).
If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request on the GitHub repository.
HabitDeck is released under the MIT License.