diff options
author | Akshay <[email protected]> | 2020-07-20 07:08:20 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-07-20 07:08:20 +0100 |
commit | 5dd90a7808c2a1ed8f7ba901765d2e42858b2192 (patch) | |
tree | 9148204681c6e66e59418b579a1849ce094834d8 | |
parent | a110cc018cd40488871bae025d11ef4ae59e9e60 (diff) |
switch to crossterm backend
-rw-r--r-- | Cargo.lock | 160 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/main.rs | 4 |
3 files changed, 132 insertions, 34 deletions
@@ -131,6 +131,15 @@ dependencies = [ | |||
131 | ] | 131 | ] |
132 | 132 | ||
133 | [[package]] | 133 | [[package]] |
134 | name = "cloudabi" | ||
135 | version = "0.0.3" | ||
136 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
137 | checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" | ||
138 | dependencies = [ | ||
139 | "bitflags", | ||
140 | ] | ||
141 | |||
142 | [[package]] | ||
134 | name = "const-random" | 143 | name = "const-random" |
135 | version = "0.1.8" | 144 | version = "0.1.8" |
136 | source = "registry+https://github.com/rust-lang/crates.io-index" | 145 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -178,6 +187,31 @@ dependencies = [ | |||
178 | ] | 187 | ] |
179 | 188 | ||
180 | [[package]] | 189 | [[package]] |
190 | name = "crossterm" | ||
191 | version = "0.17.7" | ||
192 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
193 | checksum = "6f4919d60f26ae233e14233cc39746c8c8bb8cd7b05840ace83604917b51b6c7" | ||
194 | dependencies = [ | ||
195 | "bitflags", | ||
196 | "crossterm_winapi", | ||
197 | "lazy_static", | ||
198 | "libc", | ||
199 | "mio 0.7.0", | ||
200 | "parking_lot", | ||
201 | "signal-hook", | ||
202 | "winapi 0.3.9", | ||
203 | ] | ||
204 | |||
205 | [[package]] | ||
206 | name = "crossterm_winapi" | ||
207 | version = "0.6.1" | ||
208 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
209 | checksum = "057b7146d02fb50175fd7dbe5158f6097f33d02831f43b4ee8ae4ddf67b68f5c" | ||
210 | dependencies = [ | ||
211 | "winapi 0.3.9", | ||
212 | ] | ||
213 | |||
214 | [[package]] | ||
181 | name = "ctor" | 215 | name = "ctor" |
182 | version = "0.1.15" | 216 | version = "0.1.15" |
183 | source = "registry+https://github.com/rust-lang/crates.io-index" | 217 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -196,6 +230,7 @@ dependencies = [ | |||
196 | "ahash 0.3.8", | 230 | "ahash 0.3.8", |
197 | "cfg-if", | 231 | "cfg-if", |
198 | "crossbeam-channel", | 232 | "crossbeam-channel", |
233 | "crossterm", | ||
199 | "cursive_core", | 234 | "cursive_core", |
200 | "enumset", | 235 | "enumset", |
201 | "lazy_static", | 236 | "lazy_static", |
@@ -205,7 +240,6 @@ dependencies = [ | |||
205 | "ncurses", | 240 | "ncurses", |
206 | "signal-hook", | 241 | "signal-hook", |
207 | "term_size", | 242 | "term_size", |
208 | "termion", | ||
209 | "unicode-segmentation", | 243 | "unicode-segmentation", |
210 | "unicode-width", | 244 | "unicode-width", |
211 | ] | 245 | ] |
@@ -531,6 +565,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
531 | checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" | 565 | checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" |
532 | 566 | ||
533 | [[package]] | 567 | [[package]] |
568 | name = "lock_api" | ||
569 | version = "0.3.4" | ||
570 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
571 | checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" | ||
572 | dependencies = [ | ||
573 | "scopeguard", | ||
574 | ] | ||
575 | |||
576 | [[package]] | ||
534 | name = "log" | 577 | name = "log" |
535 | version = "0.4.11" | 578 | version = "0.4.11" |
536 | source = "registry+https://github.com/rust-lang/crates.io-index" | 579 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -564,13 +607,27 @@ dependencies = [ | |||
564 | "kernel32-sys", | 607 | "kernel32-sys", |
565 | "libc", | 608 | "libc", |
566 | "log", | 609 | "log", |
567 | "miow", | 610 | "miow 0.2.1", |
568 | "net2", | 611 | "net2", |
569 | "slab", | 612 | "slab", |
570 | "winapi 0.2.8", | 613 | "winapi 0.2.8", |
571 | ] | 614 | ] |
572 | 615 | ||
573 | [[package]] | 616 | [[package]] |
617 | name = "mio" | ||
618 | version = "0.7.0" | ||
619 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
620 | checksum = "6e9971bc8349a361217a8f2a41f5d011274686bd4436465ba51730921039d7fb" | ||
621 | dependencies = [ | ||
622 | "lazy_static", | ||
623 | "libc", | ||
624 | "log", | ||
625 | "miow 0.3.5", | ||
626 | "ntapi", | ||
627 | "winapi 0.3.9", | ||
628 | ] | ||
629 | |||
630 | [[package]] | ||
574 | name = "mio-extras" | 631 | name = "mio-extras" |
575 | version = "2.0.6" | 632 | version = "2.0.6" |
576 | source = "registry+https://github.com/rust-lang/crates.io-index" | 633 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -578,7 +635,7 @@ checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" | |||
578 | dependencies = [ | 635 | dependencies = [ |
579 | "lazycell", | 636 | "lazycell", |
580 | "log", | 637 | "log", |
581 | "mio", | 638 | "mio 0.6.22", |
582 | "slab", | 639 | "slab", |
583 | ] | 640 | ] |
584 | 641 | ||
@@ -595,6 +652,16 @@ dependencies = [ | |||
595 | ] | 652 | ] |
596 | 653 | ||
597 | [[package]] | 654 | [[package]] |
655 | name = "miow" | ||
656 | version = "0.3.5" | ||
657 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
658 | checksum = "07b88fb9795d4d36d62a012dfbf49a8f5cf12751f36d31a9dbe66d528e58979e" | ||
659 | dependencies = [ | ||
660 | "socket2", | ||
661 | "winapi 0.3.9", | ||
662 | ] | ||
663 | |||
664 | [[package]] | ||
598 | name = "ncurses" | 665 | name = "ncurses" |
599 | version = "5.99.0" | 666 | version = "5.99.0" |
600 | source = "registry+https://github.com/rust-lang/crates.io-index" | 667 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -628,13 +695,22 @@ dependencies = [ | |||
628 | "fsevent-sys", | 695 | "fsevent-sys", |
629 | "inotify", | 696 | "inotify", |
630 | "libc", | 697 | "libc", |
631 | "mio", | 698 | "mio 0.6.22", |
632 | "mio-extras", | 699 | "mio-extras", |
633 | "walkdir", | 700 | "walkdir", |
634 | "winapi 0.3.9", | 701 | "winapi 0.3.9", |
635 | ] | 702 | ] |
636 | 703 | ||
637 | [[package]] | 704 | [[package]] |
705 | name = "ntapi" | ||
706 | version = "0.3.4" | ||
707 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
708 | checksum = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2" | ||
709 | dependencies = [ | ||
710 | "winapi 0.3.9", | ||
711 | ] | ||
712 | |||
713 | [[package]] | ||
638 | name = "num" | 714 | name = "num" |
639 | version = "0.3.0" | 715 | version = "0.3.0" |
640 | source = "registry+https://github.com/rust-lang/crates.io-index" | 716 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -698,12 +774,6 @@ dependencies = [ | |||
698 | ] | 774 | ] |
699 | 775 | ||
700 | [[package]] | 776 | [[package]] |
701 | name = "numtoa" | ||
702 | version = "0.1.0" | ||
703 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
704 | checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" | ||
705 | |||
706 | [[package]] | ||
707 | name = "owning_ref" | 777 | name = "owning_ref" |
708 | version = "0.4.1" | 778 | version = "0.4.1" |
709 | source = "registry+https://github.com/rust-lang/crates.io-index" | 779 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -713,6 +783,30 @@ dependencies = [ | |||
713 | ] | 783 | ] |
714 | 784 | ||
715 | [[package]] | 785 | [[package]] |
786 | name = "parking_lot" | ||
787 | version = "0.10.2" | ||
788 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
789 | checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" | ||
790 | dependencies = [ | ||
791 | "lock_api", | ||
792 | "parking_lot_core", | ||
793 | ] | ||
794 | |||
795 | [[package]] | ||
796 | name = "parking_lot_core" | ||
797 | version = "0.7.2" | ||
798 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
799 | checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" | ||
800 | dependencies = [ | ||
801 | "cfg-if", | ||
802 | "cloudabi", | ||
803 | "libc", | ||
804 | "redox_syscall", | ||
805 | "smallvec", | ||
806 | "winapi 0.3.9", | ||
807 | ] | ||
808 | |||
809 | [[package]] | ||
716 | name = "pkg-config" | 810 | name = "pkg-config" |
717 | version = "0.3.18" | 811 | version = "0.3.18" |
718 | source = "registry+https://github.com/rust-lang/crates.io-index" | 812 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -749,15 +843,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
749 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" | 843 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" |
750 | 844 | ||
751 | [[package]] | 845 | [[package]] |
752 | name = "redox_termios" | ||
753 | version = "0.1.1" | ||
754 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
755 | checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" | ||
756 | dependencies = [ | ||
757 | "redox_syscall", | ||
758 | ] | ||
759 | |||
760 | [[package]] | ||
761 | name = "redox_users" | 846 | name = "redox_users" |
762 | version = "0.3.4" | 847 | version = "0.3.4" |
763 | source = "registry+https://github.com/rust-lang/crates.io-index" | 848 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -796,6 +881,12 @@ dependencies = [ | |||
796 | ] | 881 | ] |
797 | 882 | ||
798 | [[package]] | 883 | [[package]] |
884 | name = "scopeguard" | ||
885 | version = "1.1.0" | ||
886 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
887 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" | ||
888 | |||
889 | [[package]] | ||
799 | name = "serde" | 890 | name = "serde" |
800 | version = "1.0.114" | 891 | version = "1.0.114" |
801 | source = "registry+https://github.com/rust-lang/crates.io-index" | 892 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -833,6 +924,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
833 | checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" | 924 | checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" |
834 | dependencies = [ | 925 | dependencies = [ |
835 | "libc", | 926 | "libc", |
927 | "mio 0.7.0", | ||
836 | "signal-hook-registry", | 928 | "signal-hook-registry", |
837 | ] | 929 | ] |
838 | 930 | ||
@@ -853,6 +945,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
853 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" | 945 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" |
854 | 946 | ||
855 | [[package]] | 947 | [[package]] |
948 | name = "smallvec" | ||
949 | version = "1.4.1" | ||
950 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
951 | checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f" | ||
952 | |||
953 | [[package]] | ||
954 | name = "socket2" | ||
955 | version = "0.3.12" | ||
956 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
957 | checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" | ||
958 | dependencies = [ | ||
959 | "cfg-if", | ||
960 | "libc", | ||
961 | "redox_syscall", | ||
962 | "winapi 0.3.9", | ||
963 | ] | ||
964 | |||
965 | [[package]] | ||
856 | name = "stable_deref_trait" | 966 | name = "stable_deref_trait" |
857 | version = "1.2.0" | 967 | version = "1.2.0" |
858 | source = "registry+https://github.com/rust-lang/crates.io-index" | 968 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -892,18 +1002,6 @@ dependencies = [ | |||
892 | ] | 1002 | ] |
893 | 1003 | ||
894 | [[package]] | 1004 | [[package]] |
895 | name = "termion" | ||
896 | version = "1.5.5" | ||
897 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
898 | checksum = "c22cec9d8978d906be5ac94bceb5a010d885c626c4c8855721a4dbd20e3ac905" | ||
899 | dependencies = [ | ||
900 | "libc", | ||
901 | "numtoa", | ||
902 | "redox_syscall", | ||
903 | "redox_termios", | ||
904 | ] | ||
905 | |||
906 | [[package]] | ||
907 | name = "textwrap" | 1005 | name = "textwrap" |
908 | version = "0.11.0" | 1006 | version = "0.11.0" |
909 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1007 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -22,7 +22,7 @@ notify = "4.0" | |||
22 | 22 | ||
23 | [dependencies.cursive] | 23 | [dependencies.cursive] |
24 | version = "0.15" | 24 | version = "0.15" |
25 | features = ["termion-backend"] | 25 | features = ["crossterm-backend"] |
26 | 26 | ||
27 | [dependencies.chrono] | 27 | [dependencies.chrono] |
28 | version = "0.4" | 28 | version = "0.4" |
diff --git a/src/main.rs b/src/main.rs index d96119e..fb16aaa 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 | ||
@@ -50,7 +50,7 @@ fn main() { | |||
50 | ), | 50 | ), |
51 | } | 51 | } |
52 | } else { | 52 | } else { |
53 | let mut s = termion().unwrap(); | 53 | let mut s = crossterm().unwrap(); |
54 | let app = App::load_state(); | 54 | let app = App::load_state(); |
55 | let layout = NamedView::new( | 55 | let layout = NamedView::new( |
56 | "Frame", | 56 | "Frame", |