Giter Club home page Giter Club logo

dijo's Introduction

About

dijo is a habit tracker. It is curses-based, it runs in your terminal. dijo is scriptable, hook it up with external programs to track events without moving a finger. dijo is modal, much like a certain text editor.

Features

  • vim like motions: navigate dijo with hjkl!
  • dijo is modal: different modes to view different stats!
  • vim like command mode: add with :add, delete with :delete and above all, quit with :q!.
  • fully scriptable: configure dijo to track your git commits!

Install

To get the latest release of dijo, prefer installing it via cargo. Unofficial packages exist for some package managers as well. You can also browse the Releases page for prebuilt binaries.

Cargo

# dijo requires rustc >= v1.42
$ rustup update

$ cargo install dijo

If you aren't familiar with cargo or Rust, read the complete installation guide.

Nix

dijo on nixpkgs (maintained by @Infinisil):

$ nix-env -f channel:nixpkgs-unstable -iA dijo

Snap

dijo on sanpstore (maintained by @purveshpatel511):

$ sudo snap install dijo

Arch Linux

Install dijo-bin or dijo-git from the AUR.

Windows

# the default termion backend dosen't run on windows yet
$ cargo install --no-default-features --features "crossterm-backend"

Usage

dijo has a detailed wiki, here are some good places to start out:

Gallery

Day mode, shows days of the current month:

day.png

Week mode, shows weekly summary for the weeks of the month:

weekly.png

Awesome Humane Tech

dijo's People

Contributors

br1ght0ne avatar charles-l avatar dependabot-preview[bot] avatar gyscos avatar infinisil avatar leonardosnt avatar michaelbeaumont avatar mucinoab avatar nerdypepper avatar onielfa avatar purveshpatel511 avatar salastro avatar yoms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dijo's Issues

Feature: Maximum Value Goals

I would like a way to specify that a goal was successfully reached if you are under a specific number. Most of the habits I am interested in tracking are things I don't want to do (i.e. a 0 should be green and > 0 should be red).

Just to give a suggestion, one could specify such a goal either as :add gaming <1 and just save an additional flag for that in the JSON file.

Trouble installing on Mac

I believe I followed the instructions correctly, but the install ended with:

   Compiling dijo v0.1.2
error[E0432]: unresolved import `notify::INotifyWatcher`
 --> /Users/username/.cargo/registry/src/github.com-1ecc6299db9ec823/dijo-0.1.2/src/app/mod.rs:4:30
  |
4 | use notify::{DebouncedEvent, INotifyWatcher};
  |                              ^^^^^^^^^^^^^^ no `INotifyWatcher` in the root

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: failed to compile `dijo v0.1.2`, intermediate artifacts can be found at `/var/folders/gq/6g5prsts0knc_vlvwfhz63mr0000gn/T/cargo-installOYUMfV`

Caused by:
  could not compile `dijo`.

ncurses-rs dependency causing build errors on ARM

While attempting to package dijo for Void Linux, I became aware that dijo does not compile on ARM architectures. Based on build logs, this appears to be due to a dependency on ncurses-rs. This library has known problems compiling on ARM architectures (jeaye/ncurses-rs#184, jeaye/ncurses-rs#193), and it appears to be unmaintained as of November last year (The author is still around but is no longer addressing issues or merging pull requests). Luckily, there is an open PR that appears to solve this issue, but again it is unlikely that it will be merged. In order to fix this, you may have to fork ncurses-rs, merge the PR yourself, and use your fork as a dependency instead.

Duplicate habits

Hi,

Currently (version 0.2.0), you can add two habits (or more) with the same name. Both of them will be displayed and saved and even deleted if you call :delete.

Maybe the add command should refuse the creation of a habit if there is already one with the same name ?

You were added to awesome-humane-tech

This is just a FYI issue to notify that you were added to the curated awesome-humane-tech in the 'Health' category, and - if you like that - are now entitled to wear our badge:

Awesome Humane Tech

By adding this to the README:

[![Awesome Humane Tech](https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true)](https://github.com/humanetech-community/awesome-humane-tech)

https://github.com/humanetech-community/awesome-humane-tech

No License

I wanted to make an aur package but you don't have license. I suggest something like gplv3.

Add support for reminders?

It would be interesting if this had a way to remind me to do a certain habit. Maybe via :remind habit-name 12pm

dijo not saving data on macOS

Hi! I really dig your work here. Unfortunately, it doesn't seem like the JSON output is getting generated after running dijo a few times. The folder is created, but there's no JSON file, so the data isn't persisted from one dijo run to the next:

λ cd ~/Library/Application\ Support/rs.nerdypepper.dijo
λ ll
total 0
drwxr-xr-x   2 myuser   64 Jul 21 21:08 .
drwx------+ 58 myuser 1856 Jul 21 21:08 ..

image

  • Any ideas on if I'm doing something wrong?
  • Is there any special reason for writing to Application Support/ over $XDG_CONFIG_HOME if it's configured on macOS?

Add a mode to switch from little dots to a larger symbol

My terminal theme makes it nearly impossible to discern the difference between colors in the dots. This would be fixed for the binary daily tasks by allowing a mode using symbols such as X and O instead of colored dots. This would also make the app more accessible for the visually impaired.

Dots invisible depending on terminal type

Thanks for this tool which I think will be very useful!

When I updated to 0.2.2 I found the dots in the month layout aren't visible; I believe they're black on black on my terminal (I can copy them to another terminal and they come out ok).

So far I've found:

  • It happens on 0.2.2 but not 0.2.1
  • It depends on the value of TERM. I'm running in a gnome-terminal (with or without tmux) on Ubuntu 19.10, and it works with the TERM environment variable set to xterm-256color but not with any of xterm, xterm-color, or screen.

I'm guessing it's the recent change to use pancurses; I tried building a couple of commits before that but had build errors (missing termion); I could build commit 2f47f50 which didn't have the issue.

Allow "untracking" entries

Hi,

I created a habit with no goal then increase the count to one (get habit get strikethrough) then reducing to zero, the habit is still strikethrough while the counter is to zero.

2020-07-20-125641_347x227_scrot

Logic bug with bit-type auto-tracked habits

If you have an auto-tracked habit that is defined as bit-type it will incorrectly toggle the state when multiple events occur in succession that result in an even-numbered state since it's bool and not checking for existing 1 state prior to toggling.

So the result is if I have commit defined as bit-type and make 3 commits it will show as incomplete in the display, but if I make a fourth commit it will be marked complete.

2020-08-05_11-02-31AM

Unable to compile on Ubuntu 20.04/Rust 1.45.0

Full backtrace below, not sure what to try:

~ rustc --version
rustc 1.45.0 (5c1f21c3b 2020-07-13)
~ cargo --version
cargo 1.45.0 (744bd1fbb 2020-06-15)

 ~ RUST_BACKTRACE=full cargo install dijo
    Updating crates.io index
  Installing dijo v0.2.2
   Compiling libc v0.2.73
   Compiling proc-macro2 v1.0.19
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.35
   Compiling autocfg v1.0.0
   Compiling cfg-if v0.1.10
   Compiling serde_derive v1.0.114
   Compiling getrandom v0.1.14
   Compiling serde v1.0.114
   Compiling log v0.4.11
   Compiling fnv v1.0.7
   Compiling ident_case v1.0.1
   Compiling strsim v0.9.3
   Compiling proc-macro-hack v0.5.16
   Compiling lazy_static v1.4.0
   Compiling cc v1.0.58
   Compiling bitflags v1.2.1
   Compiling pkg-config v0.3.18
   Compiling unicode-width v0.1.8
   Compiling arc-swap v0.4.7
   Compiling array-macro v1.0.5
   Compiling slab v0.4.2
   Compiling inventory v0.1.7
   Compiling stable_deref_trait v1.2.0
   Compiling ryu v1.0.5
   Compiling unicode-segmentation v1.6.0
   Compiling same-file v1.0.6
   Compiling serde_json v1.0.56
   Compiling xi-unicode v0.2.1
   Compiling lazycell v1.2.1
   Compiling ansi_term v0.11.0
   Compiling strsim v0.8.0
   Compiling itoa v0.4.6
   Compiling vec_map v0.8.2
   Compiling maplit v1.0.2
   Compiling textwrap v0.11.0
   Compiling owning_ref v0.4.1
   Compiling walkdir v2.3.1
   Compiling num-traits v0.2.12
   Compiling num-integer v0.1.43
   Compiling num-iter v0.1.41
   Compiling num-rational v0.3.0
   Compiling crossbeam-utils v0.7.2
   Compiling quote v1.0.7
   Compiling net2 v0.2.34
   Compiling signal-hook-registry v1.2.0
   Compiling time v0.1.43
   Compiling iovec v0.1.4
   Compiling inotify-sys v0.1.3
   Compiling dirs-sys v0.3.5
   Compiling filetime v0.2.10
   Compiling term_size v0.3.2
   Compiling atty v0.2.14
   Compiling signal-hook v0.1.16
   Compiling mio v0.6.22
   Compiling inotify v0.7.1
   Compiling directories v3.0.1
   Compiling clap v2.33.1
   Compiling const-random-macro v0.1.8
   Compiling mio-extras v2.0.6
   Compiling num-complex v0.3.0
   Compiling crossbeam-channel v0.4.3
   Compiling notify v4.0.15
   Compiling const-random v0.1.8
   Compiling ahash v0.4.4
   Compiling ahash v0.3.8
   Compiling num v0.3.0
   Compiling ncurses v5.99.0
error: failed to run custom build command for `ncurses v5.99.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installexNGUi/release/build/ncurses-213ba464d1dfd43a/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=NCURSESW5_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=NCURSESW5_STATIC
cargo:rerun-if-env-changed=NCURSESW5_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=NCURSESW_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=NCURSESW_STATIC
cargo:rerun-if-env-changed=NCURSESW_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:rustc-link-lib=ncursesw
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")

--- stderr
/tmp/cargo-installexNGUi/release/build/ncurses-ec99669aa43b14be/out/chtype_size.c:6:10: fatal error: ncurses.h: No such file or directory
    6 | #include <ncurses.h>
      |          ^~~~~~~~~~~
compilation terminated.
thread 'main' panicked at 'assertion failed: command.status().expect("compilation failed").success()', /home/albemuth/.cargo/registry/src/github.com-1ecc6299db9ec823/ncurses-5.99.0/build.rs:105:5
stack backtrace:
   0:     0x55ea2a813605 - backtrace::backtrace::libunwind::trace::h396c07d2071b43af
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1:     0x55ea2a813605 - backtrace::backtrace::trace_unsynchronized::h7aa0e4bb23d9c158
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2:     0x55ea2a813605 - std::sys_common::backtrace::_print_fmt::hd15ac5d4adcd355b
                               at src/libstd/sys_common/backtrace.rs:78
   3:     0x55ea2a813605 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hec5354be8ccc3ecc
                               at src/libstd/sys_common/backtrace.rs:59
   4:     0x55ea2a83684c - core::fmt::write::h3d34909eeb4f225b
                               at src/libcore/fmt/mod.rs:1076
   5:     0x55ea2a810223 - std::io::Write::write_fmt::h1da287b3de55ed16
                               at src/libstd/io/mod.rs:1537
   6:     0x55ea2a815c40 - std::sys_common::backtrace::_print::h4d206838e1ace354
                               at src/libstd/sys_common/backtrace.rs:62
   7:     0x55ea2a815c40 - std::sys_common::backtrace::print::h1f778e9940ee5977
                               at src/libstd/sys_common/backtrace.rs:49
   8:     0x55ea2a815c40 - std::panicking::default_hook::{{closure}}::h704403a56cbf5783
                               at src/libstd/panicking.rs:198
   9:     0x55ea2a81598c - std::panicking::default_hook::ha4567a10dec4ef8d
                               at src/libstd/panicking.rs:218
  10:     0x55ea2a816277 - std::panicking::rust_panic_with_hook::h88a1f16ec8a7bb20
                               at src/libstd/panicking.rs:486
  11:     0x55ea2a7e837e - std::panicking::begin_panic::hf2013973307adb85
  12:     0x55ea2a7e79f5 - build_script_build::main::hb2db1b629e9618c2
  13:     0x55ea2a7e8413 - std::rt::lang_start::{{closure}}::he558c18c553b7436
  14:     0x55ea2a816648 - std::rt::lang_start_internal::{{closure}}::h6d21eebfa4beaf70
                               at src/libstd/rt.rs:52
  15:     0x55ea2a816648 - std::panicking::try::do_call::h560a27b87db38b9c
                               at src/libstd/panicking.rs:297
  16:     0x55ea2a816648 - std::panicking::try::h453d4afd696011f9
                               at src/libstd/panicking.rs:274
  17:     0x55ea2a816648 - std::panic::catch_unwind::h211d02671f23030f
                               at src/libstd/panic.rs:394
  18:     0x55ea2a816648 - std::rt::lang_start_internal::h464df2bbf46c7e7c
                               at src/libstd/rt.rs:51
  19:     0x55ea2a7e7d72 - main
  20:     0x7f70150b10b3 - __libc_start_main
  21:     0x55ea2a7e518e - _start
  22:                0x0 - <unknown>

warning: build failed, waiting for other jobs to finish...
error: failed to compile `dijo v0.2.2`, intermediate artifacts can be found at `/tmp/cargo-installexNGUi`

Caused by:
  build failed

Too easy to delete

Hands up ✋ if you typed add (forgetting the :) and deleted two dijos by mistake.

Deleting a dijo should not be so easy.

0.2.1 not compiling on MacOS

I'm having issues installing dijo 0.2.1 on MacOS 10.15.5. It looks like when I run

cargo install dijo

I get the following output:

error[E0425]: cannot find value `s` in this scope
  --> /Users/XXXX/.cargo/registry/src/github.com-1ecc6299db9ec823/dijo-0.2.1/src/main.rs:82:9
   |
82 |         s.add_layer(layout);
   |         ^ not found in this scope

error[E0425]: cannot find value `s` in this scope
  --> /Users/XXXX/.cargo/registry/src/github.com-1ecc6299db9ec823/dijo-0.2.1/src/main.rs:83:9
   |
83 |         s.add_global_callback(':', |s| open_command_window(s));
   |         ^ not found in this scope

error[E0425]: cannot find value `s` in this scope
  --> /Users/XXXX/.cargo/registry/src/github.com-1ecc6299db9ec823/dijo-0.2.1/src/main.rs:85:9
   |
85 |         s.set_theme(theme::theme_gen());
   |         ^ not found in this scope

error[E0425]: cannot find value `s` in this scope
  --> /Users/XXXX/.cargo/registry/src/github.com-1ecc6299db9ec823/dijo-0.2.1/src/main.rs:86:9
   |
86 |         s.run();
   |         ^ not found in this scope

error: aborting due to 4 previous errors

But looking at main.rs it looks like MacOS wasn't specified, since where it says

#[cfg(any(target_os = "linux", target_os = "macos"))]
use cursive::termion;

#[cfg(target_os = "windows")]
use cursive::crossterm;

on lines 16-20 and

        #[cfg(target_os = "windows")]
        let mut s = crossterm().unwrap();

        #[cfg(any(target_os = "linux", target_os = "macos"))]
        let mut s = termion().unwrap();

on lines 71 - 75 in the current code, the file I downloaded has the following

#[cfg(target_os = "linux")]
use cursive::termion;

#[cfg(target_os = "windows")]
use cursive::crossterm;

and

        #[cfg(target_os = "windows")]
        let mut s = crossterm().unwrap();

        #[cfg(target_os = "linux")]
        let mut s = termion().unwrap();

I was able to fix this by copying the current main.rs and then trying to install dijo again.

I'm not sure how you would fix this, but I wanted to make you aware of it. Thanks for making a great habit tracker!

Auto habits are not updated when dijo is running.

When dijo is running and i update an auto tracked habit, either manually or with git hooks, the habit will not update.

Example:

This works:

dijo -c "track-up commits" && dijo

But this will not work:

dijo

dijo -c "track-up commits" # in another terminal

Feature: move between days

I often find myself forgetting to check habits on the day I complete them, and I'm sure others will find that useful.
Is there any way to "time travel" to previous days to change values?

How do you use the `false` values?

👋 hi, been using dijo happily for some months now. Was wondering how do you use the stored false values? I only have some that I created by mistake when I accidentally checked off a day but 'undo-ed' it.

Installation fails on macOS

I tried to install Dijo on macOS Catalina:

cargo install digo

but the installation failed with this error:

error[E0432]: unresolved import `notify::INotifyWatcher`
 --> /Users/ajeetdsouza/.cargo/registry/src/github.com-1ecc6299db9ec823/dijo-0.1.2/src/app/mod.rs:4:30
  |
4 | use notify::{DebouncedEvent, INotifyWatcher};
  |                              ^^^^^^^^^^^^^^ no `INotifyWatcher` in the root

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: failed to compile `dijo v0.1.2`, intermediate artifacts can be found at `/var/folders/m_/wc55txqn4t10gyk02w6vb8gw0000gn/T/cargo-installYnvmyM`

Caused by:
  could not compile `dijo`.

Can't install on macOS.

Hi!

Running cargo install dijo on macOS gives the following error when compiling cursive_core:

error[E0658]: use of unstable library feature 'mem_take'
    --> /Users/blayhem/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/cursive.rs:1027:22
     |
1027 |             menubar: std::mem::take(&mut self.menubar),
     |                      ^^^^^^^^^^^^^^
     |
     = note: for more information, see https://github.com/rust-lang/rust/issues/61129.

Installing on macOS Catalina 10.15.6 (Darwin Kernel Version 19.6.0).

The rustlang issue it mentions.

Extra info on verbose:

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name cursive_core /Users/blayhem/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C metadata=3c53a3f6c9cd6f98 -C extra-filename=-3c53a3f6c9cd6f98 --out-dir /var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps -L dependency=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps --extern ahash=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libahash-390727df5c48f09b.rmeta --extern chrono=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libchrono-3d1ee4cd8928312b.rmeta --extern crossbeam_channel=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libcrossbeam_channel-e838f77927b8b2af.rmeta --extern enum_map=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libenum_map-ef63d0120ef54768.rmeta --extern enumset=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libenumset-cf80cbc7fa56a9d4.rmeta --extern lazy_static=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/liblazy_static-fe362d3d05674e2b.rmeta --extern libc=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/liblibc-ab9f31dc62f2a5ec.rmeta --extern log=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/liblog-69e6d683a7ca371d.rmeta --extern num=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libnum-e76c036f38435412.rmeta --extern owning_ref=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libowning_ref-5ddc135c6c3b9bb6.rmeta --extern signal_hook=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libsignal_hook-674910caa72dac21.rmeta --extern unicode_segmentation=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libunicode_segmentation-0aee55a362fa5307.rmeta --extern unicode_width=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libunicode_width-95ffd67991814be7.rmeta --extern xi_unicode=/var/folders/1w/3_9z50k12_g87db33k74pvdc0000gn/T/cargo-install1EbFyp/release/deps/libxi_unicode-e8afc9f4d9f6b2e0.rmeta --cap-lints allow` (exit code: 1)

Feature Request Thread

I can edit json but I guess some features is missing

  • :rename french finnish
  • changing goals
    :goal french 5
    :goal french - for Bit mode
  • I guess, the goals should also be listed next to habbit title. For example:
    french (1/3) finnish (0/5) -english (1/1)-
  • moving mode to change habbit position from (example):
    • french, finnish, english
      to
    • english, french, finnish

for example ^m, and next hjkl and Return or Esc to out from moving mode
or :swap french finnish

[BUG] Habit name doesn't gets struck with a line after the goal has been met

Dijo Version - 0.2.2
(I Installed it from the AUR)

Screenshot

As you can see in the screenshot, gym is a 0/1 goal and even though I have set it as completed, the name hasn't been struck with a line.

I don't really know if this is a bug or if it is something related to my font or terminal. I am using st terminal with Iosevka as my font. I am using a version of Iosevka that has been patched with NerdFonts support.

Let me know if you need anything else. Thanks!

Can't install on windows

Hey, when I run cargo install on windows I'm having issues with termion

   Compiling termion v1.5.5
error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> C:\Users\xxxx\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.5\src\lib.rs:24:9
   |
24 | pub use sys::size::terminal_size;
   |         ^^^ maybe a missing crate `sys`?

I haven't tried to install it on linux yet, is this something that may be exclusive to my computer or something?

At the end it says it has failed to compile dijo v0.1.3

Data is lost when exiting unexpectedly

Dijo seems to only save its data when it is closed manually (using the q shortcut or the :quit command). If it is closed in any other way, all data since the start is lost.

I just rebooted my computer and lost data of the last 5-7 days. I'm not going to use dijo again.

But I wanted to open this issue nontheless to save others from my mistake and so that dijo can maybe overcome this limitation.

Git Synchronization

I want to sync the data store with git but every time I open the dijo it reorders keys in habit_record.json. Is there any way to prevent this behavior?

Remapping keys

Would be nice to be able to remap keys.

I use dvorak, and the the movement keys htns instead of hjkl.

No Wiki For Habit_File

I am not well versed with Rust but I found a lot of code in git regarding filewatchers, json etc but none of this information is available on Wiki. Was wondering if there were plans to add this.

Changing mode closes/crashes

Dijo closes without saving if I try to switch to WEEK mode with "v" on a habit with no goal, or with "Shift + v" if there is a habit with no goal.

Also is there theming or keymap rebinding planned?

Weekly goals

If I have a habit I'm supposed to do 3 times per week instead of daily is it possible?

Use local time instead of UTC

Habits get recorded on the current day in UTC as opposed to local time, which means they can be recorded for yesterday or tomorrow instead of today.

Background colour with Tmux

When using "xterm -bg lemonchiffon -fg black" and tmux, the background turns partly lemonchiffon when typing ":" (colon).

Feature: Track Habits for Days in the Past

After to starting to use dijo yesterday, I wanted to enter some data from the past days, but I couldn't find a way to do that.

Personally I can also clearly imagine wanting to track a habit a day or two after, because I were busy or didn't have my computer available or something, so I think this is rather necessary.

Strikethrough regression

Completing your currently focused habit used to mark the habit label with a strikethrough, but that has ceased to be the case since v2.2.0.

Working in v2.1.0:

2 1 0

Broken in v2.2.0:

2 2 0

use of unstable library feature 'str_strip': newly added

Hi

I have just tried updating from v0.1.5 to v0.2.0 using cargo install dijo and I get the following error:

   Compiling dijo v0.2.0
error[E0658]: use of unstable library feature 'str_strip': newly added
  --> /home/stephen/.cargo/registry/src/github.com-1ecc6299db9ec823/dijo-0.2.0/src/command.rs:65:70
   |
65 |                         view.set_content(format!("{}", contents) + c.strip_prefix(word).unwrap());
   |                                                                      ^^^^^^^^^^^^
   |
   = note: see issue #67302 <https://github.com/rust-lang/rust/issues/67302> for more information

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: failed to compile `dijo v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-installgeGleK`

Caused by:
  could not compile `dijo`.

To learn more, run the command again with --verbose.

I'm running Alpine Linux v3.12, rustc v1.44, and cargo v.144.

Thanks

An idea to improve weekly mode

I propose the next formula to calculate the % of every week:

  • [Weekly hours spent into the current activity] / [Total hours spent among all activities the current week] * 100
  • Example: If this week I've spent 2 hours in lerning chinese, and 8 hours in other activities, then this week the chinese calendar will show 20% because [2/10*100]=20

Why?

  • This way instead of setting goals, we can study what % of our time we are spending into each activity every week, and use that information to make better decisions. Which is important to achieve goals through an iterative and incremental process.

I don't know if this is goes too far away from what dijo is intended. if so, I'd may create a fork. Let's discuss it! Cheers.

feature request: day-specific goals

Firstly, this is a really cool, simple tool and I'm really enjoying it so far - great work!

It would be really cool to be able to specify goals only on certain days of the week, like only on weekdays or weekends.

I'm relatively new to Rust, but would be happy to give this a go if it's something you'd like in this project. :)

Does this app support default terminal colors?

Hi,

In my .Xresources file I have defined my background as being slightly darker than my black color:

*.foreground:   #c5c8c6
*.background:   #1d1f21
*.cursorColor:  #c5c8c6

! black
*.color0:       #282a2e
*.color8:       #373b41

When I start up the app I see that the background actually changes color and is now gray, using my black defined color rather than my background defined color.

Is there any way for me to set the terminal default as the background color?

Thanks,

Crash when viewing weekly summary

I was trying to add some habit without a specific goal, increased the count of the newly added habit of 1 or 2 and then checked the weekly view. It crashes here.
This is the call trace:

    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/dijo`
thread 'main' panicked at 'attempt to divide by zero', src/views.rs:84:36
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1504
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:511
  11: rust_begin_unwind
             at src/libstd/panicking.rs:419
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:111
  13: core::panicking::panic
             at src/libcore/panicking.rs:54
  14: <T as dijo::views::ShadowView>::draw::{{closure}}
             at src/views.rs:84
  15: <T as dijo::views::ShadowView>::draw
             at src/views.rs:130
  16: <dijo::habit::count::Count as dijo::habit::traits::HabitWrapper>::draw
  17: dijo::app::impl_view::<impl cursive_core::view::view_trait::View for dijo::app::App>::draw
             at src/app/impl_view.rs:28
  18: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw::{{closure}}
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  19: <cursive_core::views::named_view::NamedView<T> as cursive_core::view::view_wrapper::ViewWrapper>::with_view::{{closure}}
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/named_view.rs:65
  20: core::option::Option<T>::map
             at /home/luser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/option.rs:456
  21: <cursive_core::views::named_view::NamedView<T> as cursive_core::view::view_wrapper::ViewWrapper>::with_view
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/named_view.rs:65
  22: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  23: cursive_core::view::view_wrapper::<impl cursive_core::view::view_trait::View for T>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:107
  24: <cursive_core::views::linear_layout::LinearLayout as cursive_core::view::view_trait::View>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/linear_layout.rs:461
  25: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw::{{closure}}
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  26: <cursive_core::views::named_view::NamedView<T> as cursive_core::view::view_wrapper::ViewWrapper>::with_view::{{closure}}
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/named_view.rs:65
  27: core::option::Option<T>::map
             at /home/luser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/option.rs:456
  28: <cursive_core::views::named_view::NamedView<T> as cursive_core::view::view_wrapper::ViewWrapper>::with_view
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/named_view.rs:65
  29: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  30: cursive_core::view::view_wrapper::<impl cursive_core::view::view_trait::View for T>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:107
  31: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw::{{closure}}
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  32: <cursive_core::views::boxed_view::BoxedView as cursive_core::view::view_wrapper::ViewWrapper>::with_view
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/boxed_view.rs:52
  33: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  34: cursive_core::view::view_wrapper::<impl cursive_core::view::view_trait::View for T>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:107
  35: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw::{{closure}}
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  36: <cursive_core::views::circular_focus::CircularFocus<T> as cursive_core::view::view_wrapper::ViewWrapper>::with_view
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:176
  37: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  38: cursive_core::view::view_wrapper::<impl cursive_core::view::view_trait::View for T>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:107
  39: <cursive_core::views::layer::Layer<T> as cursive_core::view::view_wrapper::ViewWrapper>::wrap_draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/layer.rs:51
  40: cursive_core::view::view_wrapper::<impl cursive_core::view::view_trait::View for T>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:107
  41: <cursive_core::views::shadow_view::ShadowView<T> as cursive_core::view::view_wrapper::ViewWrapper>::wrap_draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/shadow_view.rs:106
  42: cursive_core::view::view_wrapper::<impl cursive_core::view::view_trait::View for T>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:107
  43: <cursive_core::views::stack_view::ChildWrapper<T> as cursive_core::view::view_trait::View>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/stack_view.rs:136
  44: cursive_core::views::stack_view::StackView::draw_fg::{{closure}}
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/stack_view.rs:550
  45: cursive_core::printer::Printer::with_color
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/printer.rs:310
  46: cursive_core::views::stack_view::StackView::draw_fg
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/stack_view.rs:545
  47: <cursive_core::views::stack_view::StackView as cursive_core::view::view_trait::View>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/stack_view.rs:613
  48: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw::{{closure}}
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  49: core::option::Option<T>::map
             at /home/luser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/option.rs:456
  50: <cursive_core::views::screens_view::ScreensView<V> as cursive_core::view::view_wrapper::ViewWrapper>::with_view
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/views/screens_view.rs:110
  51: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  52: cursive_core::view::view_wrapper::<impl cursive_core::view::view_trait::View for T>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:107
  53: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw::{{closure}}
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  54: <cursive_core::views::on_event_view::OnEventView<T> as cursive_core::view::view_wrapper::ViewWrapper>::with_view
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:176
  55: cursive_core::view::view_wrapper::ViewWrapper::wrap_draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:51
  56: cursive_core::view::view_wrapper::<impl cursive_core::view::view_trait::View for T>::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/view/view_wrapper.rs:107
  57: cursive_core::cursive::Cursive::draw
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/cursive.rs:833
  58: cursive_core::cursive::Cursive::refresh
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/cursive.rs:987
  59: cursive_core::cursive::Cursive::post_events
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/cursive.rs:967
  60: cursive_core::cursive::Cursive::step
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/cursive.rs:892
  61: cursive_core::cursive::Cursive::run
             at /home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.1.1/src/cursive.rs:877
  62: dijo::main
             at src/main.rs:63
  63: std::rt::lang_start::{{closure}}
             at /home/luser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
  64: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  65: std::panicking::try::do_call
             at src/libstd/panicking.rs:331
  66: std::panicking::try
             at src/libstd/panicking.rs:274
  67: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  68: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  69: std::rt::lang_start
             at /home/luser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
  70: main
  71: __libc_start_main
  72: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

A quick troubleshooting shows that weekly_goal at src/views.rs:84 is indeed zero.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.