
Dijo: A terminal-based habit tracker written in Rust - catacombs
https://github.com/NerdyPepper/dijo
======
ruuda
Please note that "cargo install" is intended for installing Cargo subcommands
and Rust-related tools for developers, not for distributing general software
to end-users. [https://github.com/rust-
lang/rfcs/pull/1200#issuecomment-120...](https://github.com/rust-
lang/rfcs/pull/1200#issuecomment-120662273)

~~~
qezz
Not sure if `rg` or `fd` are of either cargo subcommands or tools for
developers.

~~~
fluffything
`rg` is distributed via multiple channels - most distros have packages for it.

------
mtm7
I just have to say how much I appreciate the design of this. You killed it. It
reminds me of Ronin [0] or something you’d see on /r/unixporn [1].

Also, really cool that this is written in Rust!

[0]: [https://100r.co/site/ronin.html](https://100r.co/site/ronin.html)

[1]:
[https://www.reddit.com/r/unixporn/comments/dekj2i/oc_a_spoti...](https://www.reddit.com/r/unixporn/comments/dekj2i/oc_a_spotify_terminal_user_interface_written_in/)

~~~
input_sh
Indeed it was on r/unixporn:
[https://www.reddit.com/r/unixporn/comments/hu35i5/oc_dijo_sc...](https://www.reddit.com/r/unixporn/comments/hu35i5/oc_dijo_scriptable_cursesbased_digital_habit/)

------
mraza007
I love the terminal UI how did you create that

~~~
jnetterf
Looking at
[https://github.com/NerdyPepper/dijo/blob/8b91a7c0b3d9bd4fac3...](https://github.com/NerdyPepper/dijo/blob/8b91a7c0b3d9bd4fac3b140f5bc8a40ac324289a/Cargo.toml),
it seems like it uses
[https://crates.io/crates/cursive](https://crates.io/crates/cursive)

~~~
stingraycharles
In other words, the author did a lot of hard work to shape a fairly general
purpose UI library into a very neat design. Kudos!

~~~
felixr
There is also the font selection and the borderless terminal which improve the
aesthetics Without that it could look like this
[https://i.imgur.com/TVwkQI0.png](https://i.imgur.com/TVwkQI0.png)

But I agree, the author did really good job in creating a clean an visually
pleasing UI only using text and standard symbols

~~~
amelius
So to make it look like in the demo, you have to tweak the settings of your
terminal?

Perhaps terminals should have cascading style sheets ...

~~~
techdragon
I always find myself wanting just a little more terminal text style control.
Usually I’m left wishing I had either an alternative font mode or double sized
text. (Double specifically to avoid breaking the X*Y text cell grid)

But little wishes for extra expressiveness aside, i really don’t think
terminal UIs would benefit from anything like CSS. The terminal functions as
my working environment. I rely on being able to visually pattern scan for
errors, warnings, typical command output, time stamp and log alignment etc. I
do not want anything messing with how I set all this up.

------
badrequest
Where is this data stored? The Wiki completely glosses over this subject, and
I cannot tell from the code where it might save anything to (to be fair, I
have never written in rust).

~~~
estebank
Looks like it is stored in

    
    
      Linux:   /home/alice/.config/dijo/habit_record.json
      Windows: C:\Users\Alice\AppData\Roaming\nerdypepper\dijo\habit_record.json
      macOS:   /Users/Alice/Library/Preferences/rs.nerdypepper.dijo/habit_record.json
    

[https://github.com/NerdyPepper/dijo/blob/master/src/utils.rs...](https://github.com/NerdyPepper/dijo/blob/master/src/utils.rs#L37-L48)

[https://docs.rs/directories/0.8.5/directories/struct.Project...](https://docs.rs/directories/0.8.5/directories/struct.ProjectDirs.html)

~~~
p0llard
I haven't run this, so perhaps the behaviour is different to what I'm
expecting, but since it uses `XDG_DATA_HOME` (`data_dir` in the `directories`
crate) I'd expect it to appear as

    
    
        /home/alice/.local/share/dijo/habit_record.json
    

on XDG compliant Linux.

~~~
StavrosK
That's where it is for me, and not under ~/.config. It's a bit puzzling,
because that's where I expected it to be.

~~~
p0llard
In general ~/.config is only for config; data should be in ~/.local/share, but
a lot of programs get this wrong and abuse ~/.config using it for everything.

Even worse are the programs which use it to cache runtime data; I should be
able to add the entire ~/.config to a dotfiles repo without accidentally
including personal data (other than that which might reasonably appear in a
config file) or ephemeral data.

~~~
StavrosK
Fair enough, I guess this is actual program data rather than the config,
you're right.

------
colordrops
I tried various digital habit tracking tools, including mobile, web, and
terminal based, and the only one that has worked for me is graph paper. It's
fast and in my face next to my desk and I never forget to use it and see it
all the time.

------
fareesh
Can it track my time spent running vim in various folders? That would be
useful for me since in some solo projects I don't really commit changes often.

~~~
cl3misch
I guess not by itself, but you can control it externally in the command line.
You would have to write a daemon monitoring the folder yourself.

[https://github.com/NerdyPepper/dijo/wiki/Auto-
Habits](https://github.com/NerdyPepper/dijo/wiki/Auto-Habits)

~~~
fwip
Or a vim plugin. :)

------
Timpy
This is great! Simple and elegant. Just an idea, maybe you put a cheat sheet
under :help command. It would be very useful for people fluent in vim.

------
fardeem
Love it! Everything should live in the terminal

~~~
pjmlp
Progress, who needs it.

[https://gunkies.org/wiki/UNIX_Sixth_Edition](https://gunkies.org/wiki/UNIX_Sixth_Edition)

~~~
fardeem
Progress isn't about having pretty apps. It's about giving people what they
want.

I want a thing in my terminal that I can use to track my habits

~~~
mynameisvlad
Sure, that's what _you_ want.

I would argue that _people_ want a more traditional app instead, with what I'm
sure you'd consider a bloated and inefficient GUI. Considering that most
people don't even know what a terminal even is, and that form regularly trumps
functionality in day-to-day lives.

~~~
deadbunny
Then they already have multiple options for them to chose from...

~~~
mynameisvlad
The parent comment is implying that people don't want "pretty apps" and want
simple functional apps like this exclusively.

I am arguing that what the parent commenter wants is valid, but is likely not
what the general population wants.

In that respect, not sure how exactly your comment is relevant.

~~~
dllthomas
I don't think the parent comment was speaking for anyone but themselves. They
expressed a preference, it was rejected as opposed to _" progress"_. The
comment about progress being giving people what they want was a refutation of
that - like, "it can't be progress _for me_ if it's not what I want." The fact
that other people may want what they've been given is great - for them,
progress! but it's also irrelevant to the point being picked at.

Perhaps I'm being overly charitable to the original commenter.

------
kissgyorgy
If you are interested in a Web or Mobile (PWA) version:
[https://github.com/kissgyorgy/every-day-
calendar](https://github.com/kissgyorgy/every-day-calendar)

------
lloeki
Funnily enough “un dijo” is short for “digestif” in french.

[https://en.m.wikipedia.org/wiki/Apéritif_and_digestif](https://en.m.wikipedia.org/wiki/Apéritif_and_digestif)

~~~
ribs
And it means “he/she/it says” (or the passive-voice “it is said”) in Spanish.

~~~
anthk
More like the past voice. "Dijo" -> he/she/it said. The passive voice it's
"fue dicho" (he/she/it was been told _).

_ Said can get a different meaning, such as the reflexive voice of "decir"
(fué dicho) -> it has been said.

------
aswinmohanme
Does anyone have any idea, what font the screenshot is in ?

~~~
ReverseCold
Looked up the author's dotfiles repo[1], looks like it's Iosevka.

[1]:
[https://github.com/NerdyPepper/dotfiles/](https://github.com/NerdyPepper/dotfiles/)

------
dorkrawk
Wow, I tried to solve a similar problem in a similar way (command line based
progress tracker) with a small personal project called Trackstar:
[https://github.com/dorkrawk/trackstar](https://github.com/dorkrawk/trackstar)
but this is SO much nicer!

------
leorio
for those looking for another open source task tracker, taskwarrior[1] is a
good cli option. You can use VIT[2], curses-based front-end to taskwarrior. I
don't use VIT, but taskwarrior integrates nicely with vimwiki using
taskwiki[3].

[1] [https://taskwarrior.org/](https://taskwarrior.org/) [2]
[https://github.com/scottkosty/vit](https://github.com/scottkosty/vit) [3]
[https://github.com/tools-life/taskwiki](https://github.com/tools-
life/taskwiki)

------
didip
wow, I had no idea terminal UI can look good.

------
gfaure
The "fully scriptable" link (configure dijo to track your git commits!) seems
to be broken.

------
jsilence
Wondering if and how this could team up with orger. Could be an effient combo.

------
xdasf
try this [https://pp.elsetech.io](https://pp.elsetech.io)

------
jgalvez
Great work. Love it.

------
hpen
Very cool! Did you consider writing it in Go?

------
ijelliti
Cool piece

------
itwy
I can't shake the feeling of how ugly Rust code looks in comparison to Python,
Clojure and Go.

~~~
kabacha
As I python dev I feel kinda the opposite: rust is surprisingly pretty with
the exception of massive overuse of shift key to the point where I'd consider
it a health hazard.

The only other low-level language that is pretty that I found is nim.

~~~
wizzwizz4
Nim is nice. I Don't Like It™ because it compiles to C, instead of a True™
compiler intermediate representation, but it's a solid language.

------
dilandau
The rust community's insistence on ending every sentence "written in rust" is
only slightly more annoying than the python community's "for humans" fetish.

~~~
gameswithgo
this is a tech forum, it is common for the tech stack to be mentioned here
when showcasing a product, whether it was written in Rust or a lesser
language. (last sentence is a joke, stay calm)

