diff options
-rw-r--r-- | Cargo.lock | 180 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/main.rs | 4 |
3 files changed, 139 insertions, 47 deletions
@@ -125,6 +125,15 @@ dependencies = [ | |||
125 | ] | 125 | ] |
126 | 126 | ||
127 | [[package]] | 127 | [[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]] | ||
128 | name = "const-random" | 137 | name = "const-random" |
129 | version = "0.1.8" | 138 | version = "0.1.8" |
130 | source = "registry+https://github.com/rust-lang/crates.io-index" | 139 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -152,12 +161,12 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" | |||
152 | 161 | ||
153 | [[package]] | 162 | [[package]] |
154 | name = "crossbeam-channel" | 163 | name = "crossbeam-channel" |
155 | version = "0.4.2" | 164 | version = "0.4.3" |
156 | source = "registry+https://github.com/rust-lang/crates.io-index" | 165 | source = "registry+https://github.com/rust-lang/crates.io-index" |
157 | checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" | 166 | checksum = "09ee0cc8804d5393478d743b035099520087a5186f3b93fa58cec08fa62407b6" |
158 | dependencies = [ | 167 | dependencies = [ |
168 | "cfg-if", | ||
159 | "crossbeam-utils", | 169 | "crossbeam-utils", |
160 | "maybe-uninit", | ||
161 | ] | 170 | ] |
162 | 171 | ||
163 | [[package]] | 172 | [[package]] |
@@ -172,6 +181,31 @@ dependencies = [ | |||
172 | ] | 181 | ] |
173 | 182 | ||
174 | [[package]] | 183 | [[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]] | ||
175 | name = "ctor" | 209 | name = "ctor" |
176 | version = "0.1.15" | 210 | version = "0.1.15" |
177 | source = "registry+https://github.com/rust-lang/crates.io-index" | 211 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -190,13 +224,13 @@ dependencies = [ | |||
190 | "ahash 0.3.8", | 224 | "ahash 0.3.8", |
191 | "cfg-if", | 225 | "cfg-if", |
192 | "crossbeam-channel", | 226 | "crossbeam-channel", |
227 | "crossterm", | ||
193 | "cursive_core", | 228 | "cursive_core", |
194 | "enumset", | 229 | "enumset", |
195 | "lazy_static", | 230 | "lazy_static", |
196 | "libc", | 231 | "libc", |
197 | "log", | 232 | "log", |
198 | "signal-hook", | 233 | "signal-hook", |
199 | "termion", | ||
200 | "unicode-segmentation", | 234 | "unicode-segmentation", |
201 | "unicode-width", | 235 | "unicode-width", |
202 | ] | 236 | ] |
@@ -522,6 +556,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
522 | checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" | 556 | checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" |
523 | 557 | ||
524 | [[package]] | 558 | [[package]] |
559 | name = "lock_api" | ||
560 | version = "0.3.4" | ||
561 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
562 | checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" | ||
563 | dependencies = [ | ||
564 | "scopeguard", | ||
565 | ] | ||
566 | |||
567 | [[package]] | ||
525 | name = "log" | 568 | name = "log" |
526 | version = "0.4.11" | 569 | version = "0.4.11" |
527 | source = "registry+https://github.com/rust-lang/crates.io-index" | 570 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -531,12 +574,6 @@ dependencies = [ | |||
531 | ] | 574 | ] |
532 | 575 | ||
533 | [[package]] | 576 | [[package]] |
534 | name = "maybe-uninit" | ||
535 | version = "2.0.0" | ||
536 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
537 | checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" | ||
538 | |||
539 | [[package]] | ||
540 | name = "mio" | 577 | name = "mio" |
541 | version = "0.6.22" | 578 | version = "0.6.22" |
542 | source = "registry+https://github.com/rust-lang/crates.io-index" | 579 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -549,13 +586,27 @@ dependencies = [ | |||
549 | "kernel32-sys", | 586 | "kernel32-sys", |
550 | "libc", | 587 | "libc", |
551 | "log", | 588 | "log", |
552 | "miow", | 589 | "miow 0.2.1", |
553 | "net2", | 590 | "net2", |
554 | "slab", | 591 | "slab", |
555 | "winapi 0.2.8", | 592 | "winapi 0.2.8", |
556 | ] | 593 | ] |
557 | 594 | ||
558 | [[package]] | 595 | [[package]] |
596 | name = "mio" | ||
597 | version = "0.7.0" | ||
598 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
599 | checksum = "6e9971bc8349a361217a8f2a41f5d011274686bd4436465ba51730921039d7fb" | ||
600 | dependencies = [ | ||
601 | "lazy_static", | ||
602 | "libc", | ||
603 | "log", | ||
604 | "miow 0.3.5", | ||
605 | "ntapi", | ||
606 | "winapi 0.3.9", | ||
607 | ] | ||
608 | |||
609 | [[package]] | ||
559 | name = "mio-extras" | 610 | name = "mio-extras" |
560 | version = "2.0.6" | 611 | version = "2.0.6" |
561 | source = "registry+https://github.com/rust-lang/crates.io-index" | 612 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -563,7 +614,7 @@ checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" | |||
563 | dependencies = [ | 614 | dependencies = [ |
564 | "lazycell", | 615 | "lazycell", |
565 | "log", | 616 | "log", |
566 | "mio", | 617 | "mio 0.6.22", |
567 | "slab", | 618 | "slab", |
568 | ] | 619 | ] |
569 | 620 | ||
@@ -580,6 +631,16 @@ dependencies = [ | |||
580 | ] | 631 | ] |
581 | 632 | ||
582 | [[package]] | 633 | [[package]] |
634 | name = "miow" | ||
635 | version = "0.3.5" | ||
636 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
637 | checksum = "07b88fb9795d4d36d62a012dfbf49a8f5cf12751f36d31a9dbe66d528e58979e" | ||
638 | dependencies = [ | ||
639 | "socket2", | ||
640 | "winapi 0.3.9", | ||
641 | ] | ||
642 | |||
643 | [[package]] | ||
583 | name = "net2" | 644 | name = "net2" |
584 | version = "0.2.34" | 645 | version = "0.2.34" |
585 | source = "registry+https://github.com/rust-lang/crates.io-index" | 646 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -602,13 +663,22 @@ dependencies = [ | |||
602 | "fsevent-sys", | 663 | "fsevent-sys", |
603 | "inotify", | 664 | "inotify", |
604 | "libc", | 665 | "libc", |
605 | "mio", | 666 | "mio 0.6.22", |
606 | "mio-extras", | 667 | "mio-extras", |
607 | "walkdir", | 668 | "walkdir", |
608 | "winapi 0.3.9", | 669 | "winapi 0.3.9", |
609 | ] | 670 | ] |
610 | 671 | ||
611 | [[package]] | 672 | [[package]] |
673 | name = "ntapi" | ||
674 | version = "0.3.4" | ||
675 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
676 | checksum = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2" | ||
677 | dependencies = [ | ||
678 | "winapi 0.3.9", | ||
679 | ] | ||
680 | |||
681 | [[package]] | ||
612 | name = "num" | 682 | name = "num" |
613 | version = "0.3.0" | 683 | version = "0.3.0" |
614 | source = "registry+https://github.com/rust-lang/crates.io-index" | 684 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -672,12 +742,6 @@ dependencies = [ | |||
672 | ] | 742 | ] |
673 | 743 | ||
674 | [[package]] | 744 | [[package]] |
675 | name = "numtoa" | ||
676 | version = "0.1.0" | ||
677 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
678 | checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" | ||
679 | |||
680 | [[package]] | ||
681 | name = "owning_ref" | 745 | name = "owning_ref" |
682 | version = "0.4.1" | 746 | version = "0.4.1" |
683 | source = "registry+https://github.com/rust-lang/crates.io-index" | 747 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -687,6 +751,30 @@ dependencies = [ | |||
687 | ] | 751 | ] |
688 | 752 | ||
689 | [[package]] | 753 | [[package]] |
754 | name = "parking_lot" | ||
755 | version = "0.10.2" | ||
756 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
757 | checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" | ||
758 | dependencies = [ | ||
759 | "lock_api", | ||
760 | "parking_lot_core", | ||
761 | ] | ||
762 | |||
763 | [[package]] | ||
764 | name = "parking_lot_core" | ||
765 | version = "0.7.2" | ||
766 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
767 | checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" | ||
768 | dependencies = [ | ||
769 | "cfg-if", | ||
770 | "cloudabi", | ||
771 | "libc", | ||
772 | "redox_syscall", | ||
773 | "smallvec", | ||
774 | "winapi 0.3.9", | ||
775 | ] | ||
776 | |||
777 | [[package]] | ||
690 | name = "proc-macro-hack" | 778 | name = "proc-macro-hack" |
691 | version = "0.5.16" | 779 | version = "0.5.16" |
692 | source = "registry+https://github.com/rust-lang/crates.io-index" | 780 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -694,9 +782,9 @@ checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4" | |||
694 | 782 | ||
695 | [[package]] | 783 | [[package]] |
696 | name = "proc-macro2" | 784 | name = "proc-macro2" |
697 | version = "1.0.18" | 785 | version = "1.0.19" |
698 | source = "registry+https://github.com/rust-lang/crates.io-index" | 786 | source = "registry+https://github.com/rust-lang/crates.io-index" |
699 | checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" | 787 | checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" |
700 | dependencies = [ | 788 | dependencies = [ |
701 | "unicode-xid", | 789 | "unicode-xid", |
702 | ] | 790 | ] |
@@ -717,15 +805,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
717 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" | 805 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" |
718 | 806 | ||
719 | [[package]] | 807 | [[package]] |
720 | name = "redox_termios" | ||
721 | version = "0.1.1" | ||
722 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
723 | checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" | ||
724 | dependencies = [ | ||
725 | "redox_syscall", | ||
726 | ] | ||
727 | |||
728 | [[package]] | ||
729 | name = "redox_users" | 808 | name = "redox_users" |
730 | version = "0.3.4" | 809 | version = "0.3.4" |
731 | source = "registry+https://github.com/rust-lang/crates.io-index" | 810 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -764,6 +843,12 @@ dependencies = [ | |||
764 | ] | 843 | ] |
765 | 844 | ||
766 | [[package]] | 845 | [[package]] |
846 | name = "scopeguard" | ||
847 | version = "1.1.0" | ||
848 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
849 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" | ||
850 | |||
851 | [[package]] | ||
767 | name = "serde" | 852 | name = "serde" |
768 | version = "1.0.114" | 853 | version = "1.0.114" |
769 | source = "registry+https://github.com/rust-lang/crates.io-index" | 854 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -801,6 +886,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
801 | checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" | 886 | checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" |
802 | dependencies = [ | 887 | dependencies = [ |
803 | "libc", | 888 | "libc", |
889 | "mio 0.7.0", | ||
804 | "signal-hook-registry", | 890 | "signal-hook-registry", |
805 | ] | 891 | ] |
806 | 892 | ||
@@ -821,6 +907,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
821 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" | 907 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" |
822 | 908 | ||
823 | [[package]] | 909 | [[package]] |
910 | name = "smallvec" | ||
911 | version = "1.4.1" | ||
912 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
913 | checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f" | ||
914 | |||
915 | [[package]] | ||
916 | name = "socket2" | ||
917 | version = "0.3.12" | ||
918 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
919 | checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" | ||
920 | dependencies = [ | ||
921 | "cfg-if", | ||
922 | "libc", | ||
923 | "redox_syscall", | ||
924 | "winapi 0.3.9", | ||
925 | ] | ||
926 | |||
927 | [[package]] | ||
824 | name = "stable_deref_trait" | 928 | name = "stable_deref_trait" |
825 | version = "1.2.0" | 929 | version = "1.2.0" |
826 | source = "registry+https://github.com/rust-lang/crates.io-index" | 930 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -840,9 +944,9 @@ checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" | |||
840 | 944 | ||
841 | [[package]] | 945 | [[package]] |
842 | name = "syn" | 946 | name = "syn" |
843 | version = "1.0.34" | 947 | version = "1.0.35" |
844 | source = "registry+https://github.com/rust-lang/crates.io-index" | 948 | source = "registry+https://github.com/rust-lang/crates.io-index" |
845 | checksum = "936cae2873c940d92e697597c5eee105fb570cd5689c695806f672883653349b" | 949 | checksum = "fb7f4c519df8c117855e19dd8cc851e89eb746fe7a73f0157e0d95fdec5369b0" |
846 | dependencies = [ | 950 | dependencies = [ |
847 | "proc-macro2", | 951 | "proc-macro2", |
848 | "quote", | 952 | "quote", |
@@ -850,18 +954,6 @@ dependencies = [ | |||
850 | ] | 954 | ] |
851 | 955 | ||
852 | [[package]] | 956 | [[package]] |
853 | name = "termion" | ||
854 | version = "1.5.5" | ||
855 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
856 | checksum = "c22cec9d8978d906be5ac94bceb5a010d885c626c4c8855721a4dbd20e3ac905" | ||
857 | dependencies = [ | ||
858 | "libc", | ||
859 | "numtoa", | ||
860 | "redox_syscall", | ||
861 | "redox_termios", | ||
862 | ] | ||
863 | |||
864 | [[package]] | ||
865 | name = "textwrap" | 957 | name = "textwrap" |
866 | version = "0.11.0" | 958 | version = "0.11.0" |
867 | source = "registry+https://github.com/rust-lang/crates.io-index" | 959 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -23,7 +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 | features = ["termion-backend"] | 26 | features = ["crossterm-backend"] |
27 | 27 | ||
28 | [dependencies.chrono] | 28 | [dependencies.chrono] |
29 | version = "0.4" | 29 | version = "0.4" |
diff --git a/src/main.rs b/src/main.rs index 5523073..3e35ebc 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -12,7 +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 | use cursive::termion; | 15 | use cursive::crossterm; |
16 | use cursive::views::{LinearLayout, NamedView}; | 16 | use cursive::views::{LinearLayout, NamedView}; |
17 | use lazy_static::lazy_static; | 17 | use lazy_static::lazy_static; |
18 | 18 | ||
@@ -62,7 +62,7 @@ fn main() { | |||
62 | println!("{}", h); | 62 | println!("{}", h); |
63 | } | 63 | } |
64 | } else { | 64 | } else { |
65 | let mut s = termion().unwrap(); | 65 | let mut s = crossterm().unwrap(); |
66 | let app = App::load_state(); | 66 | let app = App::load_state(); |
67 | let layout = NamedView::new( | 67 | let layout = NamedView::new( |
68 | "Frame", | 68 | "Frame", |