سُئِلَ النَّبِيُّ صلى الله عليه وسلم أَىُّ الأَعْمَالِ أَحَبُّ إِلَى اللَّهِ قَالَ " أَدْوَمُهَا وَإِنْ قَلَّ ". وَقَالَ " اكْلَفُوا مِنَ الأَعْمَالِ مَا تُطِيقُونَ ".
The Prophet (ﷺ) was asked, "What deeds are loved most by Allah?" He said, "The most regular constant deeds even though they may be few." He added, 'Don't take upon yourselves, except the deeds which are within your ability."
سَأَلْتُ أُمَّ الْمُؤْمِنِينَ عَائِشَةَ قُلْتُ يَا أُمَّ الْمُؤْمِنِينَ كَيْفَ كَانَ عَمَلُ النَّبِيِّ صلى الله عليه وسلم هَلْ كَانَ يَخُصُّ شَيْئًا مِنَ الأَيَّامِ قَالَتْ لاَ، كَانَ عَمَلُهُ دِيمَةً، وَأَيُّكُمْ يَسْتَطِيعُ مَا كَانَ النَّبِيُّ صلى الله عليه وسلم يَسْتَطِيعُ.
I asked `Aisha, mother of the believers, "O mother of the believers! How were the deeds of the Prophet? Did he use to do extra deeds of worship on special days?" She said, "No, but his deeds were regular and constant, and who among you is able to do what the Prophet (ﷺ) was able to do (i.e. in worshipping Allah)?"
Dima (Romanization for the Arabic work ديمة): Constant calm rain without lightning or thunder.
Dima is a monthly habit tracking program.
dima_2wEJqMndNT.mp4
You can download a prebuilt release from the releases page here
Or you can build it from source
- Download/Clone the code
- Download the Odin compiler
- Add the Odin compiler to the path
- Run
build.bat
or run 'odin build main`
The program's exe will be generated in the build folder.
When you run the program, a new file called something like 2024-08.txt
(Year-Month.txt) will be created besides the exe.
That file contents look like this
xxxxxxxxxx.....................;Take a Walk;;;
xxxxxxxxxxx.............-------;Read the book;;;START book.pdf
------xxxxx....................;Write;;;START obsidian.lnk
-------------------------------;;;;
x-x-x-x-x-x-.-.-.-.-.-.-.-.-.-.;Study Math;;;
-x-x-x-x-x-.-.-.-.-.-.-.-.-.-.-;Study Programming;;;
Each line represents a habit. The line consists of five semicolon-separated parts
- The state of days (31 marks):
x
is done,.
is not done, and-
is canceled - The habit name (Optional)
- Description of the habit (Optional)
- Purpose of the habit (Optional)
- Command to launch when clicking on the habit (Optional)
The program itself doesn't edit the habits except for marking habits as done or not done.
So, to add a new habit or edit a current one, you are expected to edit the file in an external text editor.
Tip
Pressing e
will open a text editor on the habits file.
Tip
The program watches the habits file on disk. So any change will appear immediately in the program. No need to restart.
Reporting issues and feature suggestions in the issue tracker is very welcome.
Bug-fix PRs are welcome as well.
I didn't need to add any features to the program for a long time. So, features PRs might not get merged. It's better to discuss them in the issue tracker before taking any action.
You are always free to fork and make your changes.
There is a theme editor, that can be opened by pressing t
. Colors are saved automatically to colors.hex
.
dima_wWaeQyWJU7.mp4
The program operates on files on disk. You can use any syncing solution on the folder (I use SyncThing).
Something I was surprised about is the versatility of the -
. Here are some uses:
- Cancel a habit without worrying about it in following days
xxxxxxxx-----------------
- Add a new habit without affecting the previous days
--------------xx.........
- Create a separator line
---------------------------;;;;
- Schedule habits at certain days e.g. weekends
-----xx-----..-----..
- Create alternating habits
-x-x-x-x-x-x-.-.-.-.-.-
x-x-x-x-x-x-.-.-.-.-.-.
The last element of each habit is a command. When clicking on it it executes that command. Here are some ideas of how I use it
START book.pdf
: Open a book for readingSTART anki
: Start AnkiSTART c:\dev\dima\readme.md
: Open an editor to update the readme of this projectSTART D:\firefox.lnk https://.......
: Open a website for following something
To make commands shorter, you can create shortcuts or add programs to path.
Whenever you select a habit, the timer starts running. And when the habit is done, it resets. You can keep an eye on it for simple time tracking or you can ignore it.
You can toggle a habit by pressing right click on its name. This will toggle today's status.
- Semicolon separated instead of comma Separated: It's more common for me to use commas in the habit name or description compared to semicolons
- No header row: as it's unnecessary to the file format
- Easier editing in a text editor, which in turn simplifies the program
- Diffable in case of conflicts
- Easy for other programs to parse, e.g. the Android client
- A month is a good unit of habit tracking
- The end of a month is a good point for revisiting all habits
- The text format is simple so you can aggregate data across files if you wish
- The program can be extended to show months consecutively if need be
The program opens the file of the current month on stratup. And there is no date shown anywhere. However, the column of the current day is hightlighted.
The bottom bar is a space for experiments (counts/timer/description). So it might get removed at some point.
The done state is communicated through color. Thus, there is no streak counter, the graph itself is the streak. Alternatings row colors are used for easier readability.
The checkboxes act on press for immediate feedback rather than acting on release, it makes the program feel more responsive.
The particles is celberatory addition are there just for fun.