diff options
-rw-r--r-- | .github/workflows/main.yml | 15 | ||||
-rw-r--r-- | Cargo.lock | 192 | ||||
-rw-r--r-- | Cargo.toml | 7 | ||||
-rw-r--r-- | readme.md | 6 | ||||
-rw-r--r-- | src/app/impl_self.rs | 3 | ||||
-rw-r--r-- | src/main.rs | 14 |
6 files changed, 75 insertions, 162 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5c3e6f9..2c07d9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml | |||
@@ -37,9 +37,9 @@ jobs: | |||
37 | run: | | 37 | run: | |
38 | sudo apt-get update \ | 38 | sudo apt-get update \ |
39 | && sudo apt-get install -y \ | 39 | && sudo apt-get install -y \ |
40 | libdbus-1-dev | 40 | libdbus-1-dev libncurses5-dev libncursesw5-dev |
41 | - name: Build | 41 | - name: Build |
42 | run: cargo build -all --no-default-features --features unix --release && strip target/release/dijo | 42 | run: cargo build --release && strip target/release/dijo |
43 | 43 | ||
44 | - name: Upload binaries to release | 44 | - name: Upload binaries to release |
45 | uses: svenstaro/upload-release-action@v1-release | 45 | uses: svenstaro/upload-release-action@v1-release |
@@ -72,7 +72,7 @@ jobs: | |||
72 | override: true | 72 | override: true |
73 | 73 | ||
74 | - name: Build for mac | 74 | - name: Build for mac |
75 | run: cargo build --all --no-default-features --features unix --release && strip target/release/dijo | 75 | run: cargo build --release && strip target/release/dijo |
76 | 76 | ||
77 | - name: Upload binaries to release | 77 | - name: Upload binaries to release |
78 | uses: svenstaro/upload-release-action@v1-release | 78 | uses: svenstaro/upload-release-action@v1-release |
@@ -105,15 +105,14 @@ jobs: | |||
105 | override: true | 105 | override: true |
106 | 106 | ||
107 | - name: Build for windows | 107 | - name: Build for windows |
108 | run: | | 108 | shell: bash |
109 | cargo build --all --no-default-features --features windows --release | 109 | run: cargo build --release |
110 | strip target/release/dijo | ||
111 | 110 | ||
112 | - name: Upload binaries to release | 111 | - name: Upload binaries to release |
113 | uses: svenstaro/upload-release-action@v1-release | 112 | uses: svenstaro/upload-release-action@v1-release |
114 | with: | 113 | with: |
115 | repo_token: ${{ secrets.GITHUB_TOKEN }} | 114 | repo_token: ${{ secrets.GITHUB_TOKEN }} |
116 | file: target/release/dijo | 115 | file: target/release/dijo.exe |
117 | asset_name: dijo-x86_64-windows | 116 | asset_name: dijo-x86_64-windows.exe |
118 | tag: ${{ github.ref }} | 117 | tag: ${{ github.ref }} |
119 | overwrite: true | 118 | overwrite: true |
@@ -92,6 +92,12 @@ dependencies = [ | |||
92 | ] | 92 | ] |
93 | 93 | ||
94 | [[package]] | 94 | [[package]] |
95 | name = "cc" | ||
96 | version = "1.0.58" | ||
97 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
98 | checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" | ||
99 | |||
100 | [[package]] | ||
95 | name = "cfg-if" | 101 | name = "cfg-if" |
96 | version = "0.1.10" | 102 | version = "0.1.10" |
97 | source = "registry+https://github.com/rust-lang/crates.io-index" | 103 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -125,15 +131,6 @@ dependencies = [ | |||
125 | ] | 131 | ] |
126 | 132 | ||
127 | [[package]] | 133 | [[package]] |
128 | name = "cloudabi" | ||
129 | version = "0.0.3" | ||
130 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
131 | checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" | ||
132 | dependencies = [ | ||
133 | "bitflags", | ||
134 | ] | ||
135 | |||
136 | [[package]] | ||
137 | name = "const-random" | 134 | name = "const-random" |
138 | version = "0.1.8" | 135 | version = "0.1.8" |
139 | source = "registry+https://github.com/rust-lang/crates.io-index" | 136 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -181,31 +178,6 @@ dependencies = [ | |||
181 | ] | 178 | ] |
182 | 179 | ||
183 | [[package]] | 180 | [[package]] |
184 | name = "crossterm" | ||
185 | version = "0.17.7" | ||
186 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
187 | checksum = "6f4919d60f26ae233e14233cc39746c8c8bb8cd7b05840ace83604917b51b6c7" | ||
188 | dependencies = [ | ||
189 | "bitflags", | ||
190 | "crossterm_winapi", | ||
191 | "lazy_static", | ||
192 | "libc", | ||
193 | "mio 0.7.0", | ||
194 | "parking_lot", | ||
195 | "signal-hook", | ||
196 | "winapi 0.3.9", | ||
197 | ] | ||
198 | |||
199 | [[package]] | ||
200 | name = "crossterm_winapi" | ||
201 | version = "0.6.1" | ||
202 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
203 | checksum = "057b7146d02fb50175fd7dbe5158f6097f33d02831f43b4ee8ae4ddf67b68f5c" | ||
204 | dependencies = [ | ||
205 | "winapi 0.3.9", | ||
206 | ] | ||
207 | |||
208 | [[package]] | ||
209 | name = "ctor" | 181 | name = "ctor" |
210 | version = "0.1.15" | 182 | version = "0.1.15" |
211 | source = "registry+https://github.com/rust-lang/crates.io-index" | 183 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -224,14 +196,15 @@ dependencies = [ | |||
224 | "ahash 0.3.8", | 196 | "ahash 0.3.8", |
225 | "cfg-if", | 197 | "cfg-if", |
226 | "crossbeam-channel", | 198 | "crossbeam-channel", |
227 | "crossterm", | ||
228 | "cursive_core", | 199 | "cursive_core", |
229 | "enumset", | 200 | "enumset", |
230 | "lazy_static", | 201 | "lazy_static", |
231 | "libc", | 202 | "libc", |
232 | "log", | 203 | "log", |
204 | "maplit", | ||
205 | "pancurses", | ||
233 | "signal-hook", | 206 | "signal-hook", |
234 | "termion", | 207 | "term_size", |
235 | "unicode-segmentation", | 208 | "unicode-segmentation", |
236 | "unicode-width", | 209 | "unicode-width", |
237 | ] | 210 | ] |
@@ -295,7 +268,7 @@ dependencies = [ | |||
295 | 268 | ||
296 | [[package]] | 269 | [[package]] |
297 | name = "dijo" | 270 | name = "dijo" |
298 | version = "0.2.1" | 271 | version = "0.2.2" |
299 | dependencies = [ | 272 | dependencies = [ |
300 | "chrono", | 273 | "chrono", |
301 | "clap", | 274 | "clap", |
@@ -557,15 +530,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
557 | checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" | 530 | checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" |
558 | 531 | ||
559 | [[package]] | 532 | [[package]] |
560 | name = "lock_api" | ||
561 | version = "0.3.4" | ||
562 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
563 | checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" | ||
564 | dependencies = [ | ||
565 | "scopeguard", | ||
566 | ] | ||
567 | |||
568 | [[package]] | ||
569 | name = "log" | 533 | name = "log" |
570 | version = "0.4.11" | 534 | version = "0.4.11" |
571 | source = "registry+https://github.com/rust-lang/crates.io-index" | 535 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -575,6 +539,12 @@ dependencies = [ | |||
575 | ] | 539 | ] |
576 | 540 | ||
577 | [[package]] | 541 | [[package]] |
542 | name = "maplit" | ||
543 | version = "1.0.2" | ||
544 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
545 | checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" | ||
546 | |||
547 | [[package]] | ||
578 | name = "mio" | 548 | name = "mio" |
579 | version = "0.6.22" | 549 | version = "0.6.22" |
580 | source = "registry+https://github.com/rust-lang/crates.io-index" | 550 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -587,27 +557,13 @@ dependencies = [ | |||
587 | "kernel32-sys", | 557 | "kernel32-sys", |
588 | "libc", | 558 | "libc", |
589 | "log", | 559 | "log", |
590 | "miow 0.2.1", | 560 | "miow", |
591 | "net2", | 561 | "net2", |
592 | "slab", | 562 | "slab", |
593 | "winapi 0.2.8", | 563 | "winapi 0.2.8", |
594 | ] | 564 | ] |
595 | 565 | ||
596 | [[package]] | 566 | [[package]] |
597 | name = "mio" | ||
598 | version = "0.7.0" | ||
599 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
600 | checksum = "6e9971bc8349a361217a8f2a41f5d011274686bd4436465ba51730921039d7fb" | ||
601 | dependencies = [ | ||
602 | "lazy_static", | ||
603 | "libc", | ||
604 | "log", | ||
605 | "miow 0.3.5", | ||
606 | "ntapi", | ||
607 | "winapi 0.3.9", | ||
608 | ] | ||
609 | |||
610 | [[package]] | ||
611 | name = "mio-extras" | 567 | name = "mio-extras" |
612 | version = "2.0.6" | 568 | version = "2.0.6" |
613 | source = "registry+https://github.com/rust-lang/crates.io-index" | 569 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -615,7 +571,7 @@ checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" | |||
615 | dependencies = [ | 571 | dependencies = [ |
616 | "lazycell", | 572 | "lazycell", |
617 | "log", | 573 | "log", |
618 | "mio 0.6.22", | 574 | "mio", |
619 | "slab", | 575 | "slab", |
620 | ] | 576 | ] |
621 | 577 | ||
@@ -632,13 +588,14 @@ dependencies = [ | |||
632 | ] | 588 | ] |
633 | 589 | ||
634 | [[package]] | 590 | [[package]] |
635 | name = "miow" | 591 | name = "ncurses" |
636 | version = "0.3.5" | 592 | version = "5.99.0" |
637 | source = "registry+https://github.com/rust-lang/crates.io-index" | 593 | source = "registry+https://github.com/rust-lang/crates.io-index" |
638 | checksum = "07b88fb9795d4d36d62a012dfbf49a8f5cf12751f36d31a9dbe66d528e58979e" | 594 | checksum = "15699bee2f37e9f8828c7b35b2bc70d13846db453f2d507713b758fabe536b82" |
639 | dependencies = [ | 595 | dependencies = [ |
640 | "socket2", | 596 | "cc", |
641 | "winapi 0.3.9", | 597 | "libc", |
598 | "pkg-config", | ||
642 | ] | 599 | ] |
643 | 600 | ||
644 | [[package]] | 601 | [[package]] |
@@ -664,22 +621,13 @@ dependencies = [ | |||
664 | "fsevent-sys", | 621 | "fsevent-sys", |
665 | "inotify", | 622 | "inotify", |
666 | "libc", | 623 | "libc", |
667 | "mio 0.6.22", | 624 | "mio", |
668 | "mio-extras", | 625 | "mio-extras", |
669 | "walkdir", | 626 | "walkdir", |
670 | "winapi 0.3.9", | 627 | "winapi 0.3.9", |
671 | ] | 628 | ] |
672 | 629 | ||
673 | [[package]] | 630 | [[package]] |
674 | name = "ntapi" | ||
675 | version = "0.3.4" | ||
676 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
677 | checksum = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2" | ||
678 | dependencies = [ | ||
679 | "winapi 0.3.9", | ||
680 | ] | ||
681 | |||
682 | [[package]] | ||
683 | name = "num" | 631 | name = "num" |
684 | version = "0.3.0" | 632 | version = "0.3.0" |
685 | source = "registry+https://github.com/rust-lang/crates.io-index" | 633 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -743,12 +691,6 @@ dependencies = [ | |||
743 | ] | 691 | ] |
744 | 692 | ||
745 | [[package]] | 693 | [[package]] |
746 | name = "numtoa" | ||
747 | version = "0.1.0" | ||
748 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
749 | checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" | ||
750 | |||
751 | [[package]] | ||
752 | name = "owning_ref" | 694 | name = "owning_ref" |
753 | version = "0.4.1" | 695 | version = "0.4.1" |
754 | source = "registry+https://github.com/rust-lang/crates.io-index" | 696 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -758,30 +700,35 @@ dependencies = [ | |||
758 | ] | 700 | ] |
759 | 701 | ||
760 | [[package]] | 702 | [[package]] |
761 | name = "parking_lot" | 703 | name = "pancurses" |
762 | version = "0.10.2" | 704 | version = "0.16.1" |
763 | source = "registry+https://github.com/rust-lang/crates.io-index" | 705 | source = "registry+https://github.com/rust-lang/crates.io-index" |
764 | checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" | 706 | checksum = "d3058bc37c433096b2ac7afef1c5cdfae49ede0a4ffec3dfc1df1df0959d0ff0" |
765 | dependencies = [ | 707 | dependencies = [ |
766 | "lock_api", | 708 | "libc", |
767 | "parking_lot_core", | 709 | "log", |
710 | "ncurses", | ||
711 | "pdcurses-sys", | ||
712 | "winreg", | ||
768 | ] | 713 | ] |
769 | 714 | ||
770 | [[package]] | 715 | [[package]] |
771 | name = "parking_lot_core" | 716 | name = "pdcurses-sys" |
772 | version = "0.7.2" | 717 | version = "0.7.1" |
773 | source = "registry+https://github.com/rust-lang/crates.io-index" | 718 | source = "registry+https://github.com/rust-lang/crates.io-index" |
774 | checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" | 719 | checksum = "084dd22796ff60f1225d4eb6329f33afaf4c85419d51d440ab6b8c6f4529166b" |
775 | dependencies = [ | 720 | dependencies = [ |
776 | "cfg-if", | 721 | "cc", |
777 | "cloudabi", | ||
778 | "libc", | 722 | "libc", |
779 | "redox_syscall", | ||
780 | "smallvec", | ||
781 | "winapi 0.3.9", | ||
782 | ] | 723 | ] |
783 | 724 | ||
784 | [[package]] | 725 | [[package]] |
726 | name = "pkg-config" | ||
727 | version = "0.3.18" | ||
728 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
729 | checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" | ||
730 | |||
731 | [[package]] | ||
785 | name = "proc-macro-hack" | 732 | name = "proc-macro-hack" |
786 | version = "0.5.16" | 733 | version = "0.5.16" |
787 | source = "registry+https://github.com/rust-lang/crates.io-index" | 734 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -812,15 +759,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
812 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" | 759 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" |
813 | 760 | ||
814 | [[package]] | 761 | [[package]] |
815 | name = "redox_termios" | ||
816 | version = "0.1.1" | ||
817 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
818 | checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" | ||
819 | dependencies = [ | ||
820 | "redox_syscall", | ||
821 | ] | ||
822 | |||
823 | [[package]] | ||
824 | name = "redox_users" | 762 | name = "redox_users" |
825 | version = "0.3.4" | 763 | version = "0.3.4" |
826 | source = "registry+https://github.com/rust-lang/crates.io-index" | 764 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -859,12 +797,6 @@ dependencies = [ | |||
859 | ] | 797 | ] |
860 | 798 | ||
861 | [[package]] | 799 | [[package]] |
862 | name = "scopeguard" | ||
863 | version = "1.1.0" | ||
864 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
865 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" | ||
866 | |||
867 | [[package]] | ||
868 | name = "serde" | 800 | name = "serde" |
869 | version = "1.0.114" | 801 | version = "1.0.114" |
870 | source = "registry+https://github.com/rust-lang/crates.io-index" | 802 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -902,7 +834,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
902 | checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" | 834 | checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" |
903 | dependencies = [ | 835 | dependencies = [ |
904 | "libc", | 836 | "libc", |
905 | "mio 0.7.0", | ||
906 | "signal-hook-registry", | 837 | "signal-hook-registry", |
907 | ] | 838 | ] |
908 | 839 | ||
@@ -923,24 +854,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
923 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" | 854 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" |
924 | 855 | ||
925 | [[package]] | 856 | [[package]] |
926 | name = "smallvec" | ||
927 | version = "1.4.1" | ||
928 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
929 | checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f" | ||
930 | |||
931 | [[package]] | ||
932 | name = "socket2" | ||
933 | version = "0.3.12" | ||
934 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
935 | checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" | ||
936 | dependencies = [ | ||
937 | "cfg-if", | ||
938 | "libc", | ||
939 | "redox_syscall", | ||
940 | "winapi 0.3.9", | ||
941 | ] | ||
942 | |||
943 | [[package]] | ||
944 | name = "stable_deref_trait" | 857 | name = "stable_deref_trait" |
945 | version = "1.2.0" | 858 | version = "1.2.0" |
946 | source = "registry+https://github.com/rust-lang/crates.io-index" | 859 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -970,15 +883,13 @@ dependencies = [ | |||
970 | ] | 883 | ] |
971 | 884 | ||
972 | [[package]] | 885 | [[package]] |
973 | name = "termion" | 886 | name = "term_size" |
974 | version = "1.5.5" | 887 | version = "0.3.2" |
975 | source = "registry+https://github.com/rust-lang/crates.io-index" | 888 | source = "registry+https://github.com/rust-lang/crates.io-index" |
976 | checksum = "c22cec9d8978d906be5ac94bceb5a010d885c626c4c8855721a4dbd20e3ac905" | 889 | checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" |
977 | dependencies = [ | 890 | dependencies = [ |
978 | "libc", | 891 | "libc", |
979 | "numtoa", | 892 | "winapi 0.3.9", |
980 | "redox_syscall", | ||
981 | "redox_termios", | ||
982 | ] | 893 | ] |
983 | 894 | ||
984 | [[package]] | 895 | [[package]] |
@@ -1109,6 +1020,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1109 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | 1020 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" |
1110 | 1021 | ||
1111 | [[package]] | 1022 | [[package]] |
1023 | name = "winreg" | ||
1024 | version = "0.5.1" | ||
1025 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1026 | checksum = "a27a759395c1195c4cc5cda607ef6f8f6498f64e78f7900f5de0a127a424704a" | ||
1027 | dependencies = [ | ||
1028 | "winapi 0.3.9", | ||
1029 | ] | ||
1030 | |||
1031 | [[package]] | ||
1112 | name = "ws2_32-sys" | 1032 | name = "ws2_32-sys" |
1113 | version = "0.2.1" | 1033 | version = "0.2.1" |
1114 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1034 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1,6 +1,6 @@ | |||
1 | [package] | 1 | [package] |
2 | name = "dijo" | 2 | name = "dijo" |
3 | version = "0.2.1" | 3 | version = "0.2.2" |
4 | authors = ["Akshay <[email protected]>"] | 4 | authors = ["Akshay <[email protected]>"] |
5 | edition = "2018" | 5 | edition = "2018" |
6 | description = "Scriptable, curses-based, digital habit tracker" | 6 | description = "Scriptable, curses-based, digital habit tracker" |
@@ -23,10 +23,7 @@ notify = "4.0" | |||
23 | [dependencies.cursive] | 23 | [dependencies.cursive] |
24 | version = "0.15" | 24 | version = "0.15" |
25 | default-features = false | 25 | default-features = false |
26 | 26 | features = ["pancurses-backend"] | |
27 | [features] | ||
28 | unix = ["cursive/termion-backend"] | ||
29 | windows = ["cursive/crossterm-backend"] | ||
30 | 27 | ||
31 | [dependencies.chrono] | 28 | [dependencies.chrono] |
32 | version = "0.4" | 29 | version = "0.4" |
@@ -32,6 +32,12 @@ $ rustup update | |||
32 | $ cargo install dijo | 32 | $ cargo install dijo |
33 | ``` | 33 | ``` |
34 | 34 | ||
35 | `dijo` on nixpkgs (maintained by [@Infinisil](https://github.com/Infinisil)): | ||
36 | |||
37 | ``` | ||
38 | $ nix-env -f channel:nixpkgs-unstable -iA dijo | ||
39 | ``` | ||
40 | |||
35 | If you aren't familiar with `cargo` or Rust, read the [complete | 41 | If you aren't familiar with `cargo` or Rust, read the [complete |
36 | installation](https://github.com/NerdyPepper/dijo/wiki/Install) | 42 | installation](https://github.com/NerdyPepper/dijo/wiki/Install) |
37 | guide. | 43 | guide. |
diff --git a/src/app/impl_self.rs b/src/app/impl_self.rs index a806dc5..39882be 100644 --- a/src/app/impl_self.rs +++ b/src/app/impl_self.rs | |||
@@ -251,7 +251,8 @@ impl App { | |||
251 | "mnext" | "month-next" => "month-next (alias: mnext)", | 251 | "mnext" | "month-next" => "month-next (alias: mnext)", |
252 | "tup" | "track-up" => "track-up <auto-habit-name> (alias: tup)", | 252 | "tup" | "track-up" => "track-up <auto-habit-name> (alias: tup)", |
253 | "tdown" | "track-down" => "track-down <auto-habit-name> (alias: tdown)", | 253 | "tdown" | "track-down" => "track-down <auto-habit-name> (alias: tdown)", |
254 | "q" | "quit" => "quit", | 254 | "q" | "quit" => "quit dijo", |
255 | "w" | "write" => "write current state to disk (alias: w)", | ||
255 | "h"|"?" | "help" => "help [<command>|commands|keys] (aliases: h, ?)", | 256 | "h"|"?" | "help" => "help [<command>|commands|keys] (aliases: h, ?)", |
256 | "cmds" | "commands" => "add, add-auto, delete, month-{prev,next}, track-{up,down}, help, quit", | 257 | "cmds" | "commands" => "add, add-auto, delete, month-{prev,next}, track-{up,down}, help, quit", |
257 | "keys" => "TODO", // TODO (view?) | 258 | "keys" => "TODO", // TODO (view?) |
diff --git a/src/main.rs b/src/main.rs index 609738e..84fd8ee 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -12,13 +12,7 @@ use crate::command::{open_command_window, Command}; | |||
12 | use crate::utils::{load_configuration_file, AppConfig}; | 12 | use crate::utils::{load_configuration_file, AppConfig}; |
13 | 13 | ||
14 | use clap::{App as ClapApp, Arg}; | 14 | use clap::{App as ClapApp, Arg}; |
15 | 15 | use cursive::pancurses; | |
16 | #[cfg(any(target_os = "linux", target_os = "macos"))] | ||
17 | use cursive::termion; | ||
18 | |||
19 | #[cfg(target_os = "windows")] | ||
20 | use cursive::crossterm; | ||
21 | |||
22 | use cursive::views::{LinearLayout, NamedView}; | 16 | use cursive::views::{LinearLayout, NamedView}; |
23 | use lazy_static::lazy_static; | 17 | use lazy_static::lazy_static; |
24 | 18 | ||
@@ -68,11 +62,7 @@ fn main() { | |||
68 | println!("{}", h); | 62 | println!("{}", h); |
69 | } | 63 | } |
70 | } else { | 64 | } else { |
71 | #[cfg(target_os = "windows")] | 65 | let mut s = pancurses().unwrap(); |
72 | let mut s = crossterm().unwrap(); | ||
73 | |||
74 | #[cfg(any(target_os = "linux", target_os = "macos"))] | ||
75 | let mut s = termion().unwrap(); | ||
76 | 66 | ||
77 | let app = App::load_state(); | 67 | let app = App::load_state(); |
78 | let layout = NamedView::new( | 68 | let layout = NamedView::new( |