aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-07-20 07:08:20 +0100
committerOleksii Filonenko <[email protected]>2020-07-23 09:50:07 +0100
commit7322949561fdbdc36a811b1368222fb5a2bf050a (patch)
tree08d55686bcd7acece482cf0eb31028e122d53413
parentb763206c9fc24f54af4bfebe80d2a7b7579557d5 (diff)
switch to crossterm backend
-rw-r--r--Cargo.lock180
-rw-r--r--Cargo.toml2
-rw-r--r--src/main.rs4
3 files changed, 139 insertions, 47 deletions
diff --git a/Cargo.lock b/Cargo.lock
index a299289..25e21e6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -125,6 +125,15 @@ dependencies = [
125] 125]
126 126
127[[package]] 127[[package]]
128name = "cloudabi"
129version = "0.0.3"
130source = "registry+https://github.com/rust-lang/crates.io-index"
131checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
132dependencies = [
133 "bitflags",
134]
135
136[[package]]
128name = "const-random" 137name = "const-random"
129version = "0.1.8" 138version = "0.1.8"
130source = "registry+https://github.com/rust-lang/crates.io-index" 139source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -152,12 +161,12 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
152 161
153[[package]] 162[[package]]
154name = "crossbeam-channel" 163name = "crossbeam-channel"
155version = "0.4.2" 164version = "0.4.3"
156source = "registry+https://github.com/rust-lang/crates.io-index" 165source = "registry+https://github.com/rust-lang/crates.io-index"
157checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" 166checksum = "09ee0cc8804d5393478d743b035099520087a5186f3b93fa58cec08fa62407b6"
158dependencies = [ 167dependencies = [
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]]
184name = "crossterm"
185version = "0.17.7"
186source = "registry+https://github.com/rust-lang/crates.io-index"
187checksum = "6f4919d60f26ae233e14233cc39746c8c8bb8cd7b05840ace83604917b51b6c7"
188dependencies = [
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]]
200name = "crossterm_winapi"
201version = "0.6.1"
202source = "registry+https://github.com/rust-lang/crates.io-index"
203checksum = "057b7146d02fb50175fd7dbe5158f6097f33d02831f43b4ee8ae4ddf67b68f5c"
204dependencies = [
205 "winapi 0.3.9",
206]
207
208[[package]]
175name = "ctor" 209name = "ctor"
176version = "0.1.15" 210version = "0.1.15"
177source = "registry+https://github.com/rust-lang/crates.io-index" 211source = "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"
522checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" 556checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9"
523 557
524[[package]] 558[[package]]
559name = "lock_api"
560version = "0.3.4"
561source = "registry+https://github.com/rust-lang/crates.io-index"
562checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75"
563dependencies = [
564 "scopeguard",
565]
566
567[[package]]
525name = "log" 568name = "log"
526version = "0.4.11" 569version = "0.4.11"
527source = "registry+https://github.com/rust-lang/crates.io-index" 570source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -531,12 +574,6 @@ dependencies = [
531] 574]
532 575
533[[package]] 576[[package]]
534name = "maybe-uninit"
535version = "2.0.0"
536source = "registry+https://github.com/rust-lang/crates.io-index"
537checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
538
539[[package]]
540name = "mio" 577name = "mio"
541version = "0.6.22" 578version = "0.6.22"
542source = "registry+https://github.com/rust-lang/crates.io-index" 579source = "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]]
596name = "mio"
597version = "0.7.0"
598source = "registry+https://github.com/rust-lang/crates.io-index"
599checksum = "6e9971bc8349a361217a8f2a41f5d011274686bd4436465ba51730921039d7fb"
600dependencies = [
601 "lazy_static",
602 "libc",
603 "log",
604 "miow 0.3.5",
605 "ntapi",
606 "winapi 0.3.9",
607]
608
609[[package]]
559name = "mio-extras" 610name = "mio-extras"
560version = "2.0.6" 611version = "2.0.6"
561source = "registry+https://github.com/rust-lang/crates.io-index" 612source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -563,7 +614,7 @@ checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
563dependencies = [ 614dependencies = [
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]]
634name = "miow"
635version = "0.3.5"
636source = "registry+https://github.com/rust-lang/crates.io-index"
637checksum = "07b88fb9795d4d36d62a012dfbf49a8f5cf12751f36d31a9dbe66d528e58979e"
638dependencies = [
639 "socket2",
640 "winapi 0.3.9",
641]
642
643[[package]]
583name = "net2" 644name = "net2"
584version = "0.2.34" 645version = "0.2.34"
585source = "registry+https://github.com/rust-lang/crates.io-index" 646source = "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]]
673name = "ntapi"
674version = "0.3.4"
675source = "registry+https://github.com/rust-lang/crates.io-index"
676checksum = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2"
677dependencies = [
678 "winapi 0.3.9",
679]
680
681[[package]]
612name = "num" 682name = "num"
613version = "0.3.0" 683version = "0.3.0"
614source = "registry+https://github.com/rust-lang/crates.io-index" 684source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -672,12 +742,6 @@ dependencies = [
672] 742]
673 743
674[[package]] 744[[package]]
675name = "numtoa"
676version = "0.1.0"
677source = "registry+https://github.com/rust-lang/crates.io-index"
678checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef"
679
680[[package]]
681name = "owning_ref" 745name = "owning_ref"
682version = "0.4.1" 746version = "0.4.1"
683source = "registry+https://github.com/rust-lang/crates.io-index" 747source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -687,6 +751,30 @@ dependencies = [
687] 751]
688 752
689[[package]] 753[[package]]
754name = "parking_lot"
755version = "0.10.2"
756source = "registry+https://github.com/rust-lang/crates.io-index"
757checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e"
758dependencies = [
759 "lock_api",
760 "parking_lot_core",
761]
762
763[[package]]
764name = "parking_lot_core"
765version = "0.7.2"
766source = "registry+https://github.com/rust-lang/crates.io-index"
767checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"
768dependencies = [
769 "cfg-if",
770 "cloudabi",
771 "libc",
772 "redox_syscall",
773 "smallvec",
774 "winapi 0.3.9",
775]
776
777[[package]]
690name = "proc-macro-hack" 778name = "proc-macro-hack"
691version = "0.5.16" 779version = "0.5.16"
692source = "registry+https://github.com/rust-lang/crates.io-index" 780source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -694,9 +782,9 @@ checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4"
694 782
695[[package]] 783[[package]]
696name = "proc-macro2" 784name = "proc-macro2"
697version = "1.0.18" 785version = "1.0.19"
698source = "registry+https://github.com/rust-lang/crates.io-index" 786source = "registry+https://github.com/rust-lang/crates.io-index"
699checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" 787checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12"
700dependencies = [ 788dependencies = [
701 "unicode-xid", 789 "unicode-xid",
702] 790]
@@ -717,15 +805,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
717checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" 805checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
718 806
719[[package]] 807[[package]]
720name = "redox_termios"
721version = "0.1.1"
722source = "registry+https://github.com/rust-lang/crates.io-index"
723checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
724dependencies = [
725 "redox_syscall",
726]
727
728[[package]]
729name = "redox_users" 808name = "redox_users"
730version = "0.3.4" 809version = "0.3.4"
731source = "registry+https://github.com/rust-lang/crates.io-index" 810source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -764,6 +843,12 @@ dependencies = [
764] 843]
765 844
766[[package]] 845[[package]]
846name = "scopeguard"
847version = "1.1.0"
848source = "registry+https://github.com/rust-lang/crates.io-index"
849checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
850
851[[package]]
767name = "serde" 852name = "serde"
768version = "1.0.114" 853version = "1.0.114"
769source = "registry+https://github.com/rust-lang/crates.io-index" 854source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -801,6 +886,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
801checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" 886checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed"
802dependencies = [ 887dependencies = [
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"
821checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 907checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
822 908
823[[package]] 909[[package]]
910name = "smallvec"
911version = "1.4.1"
912source = "registry+https://github.com/rust-lang/crates.io-index"
913checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f"
914
915[[package]]
916name = "socket2"
917version = "0.3.12"
918source = "registry+https://github.com/rust-lang/crates.io-index"
919checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"
920dependencies = [
921 "cfg-if",
922 "libc",
923 "redox_syscall",
924 "winapi 0.3.9",
925]
926
927[[package]]
824name = "stable_deref_trait" 928name = "stable_deref_trait"
825version = "1.2.0" 929version = "1.2.0"
826source = "registry+https://github.com/rust-lang/crates.io-index" 930source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -840,9 +944,9 @@ checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
840 944
841[[package]] 945[[package]]
842name = "syn" 946name = "syn"
843version = "1.0.34" 947version = "1.0.35"
844source = "registry+https://github.com/rust-lang/crates.io-index" 948source = "registry+https://github.com/rust-lang/crates.io-index"
845checksum = "936cae2873c940d92e697597c5eee105fb570cd5689c695806f672883653349b" 949checksum = "fb7f4c519df8c117855e19dd8cc851e89eb746fe7a73f0157e0d95fdec5369b0"
846dependencies = [ 950dependencies = [
847 "proc-macro2", 951 "proc-macro2",
848 "quote", 952 "quote",
@@ -850,18 +954,6 @@ dependencies = [
850] 954]
851 955
852[[package]] 956[[package]]
853name = "termion"
854version = "1.5.5"
855source = "registry+https://github.com/rust-lang/crates.io-index"
856checksum = "c22cec9d8978d906be5ac94bceb5a010d885c626c4c8855721a4dbd20e3ac905"
857dependencies = [
858 "libc",
859 "numtoa",
860 "redox_syscall",
861 "redox_termios",
862]
863
864[[package]]
865name = "textwrap" 957name = "textwrap"
866version = "0.11.0" 958version = "0.11.0"
867source = "registry+https://github.com/rust-lang/crates.io-index" 959source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index f215503..c587196 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,7 +23,7 @@ notify = "4.0"
23[dependencies.cursive] 23[dependencies.cursive]
24version = "0.15" 24version = "0.15"
25default-features = false 25default-features = false
26features = ["termion-backend"] 26features = ["crossterm-backend"]
27 27
28[dependencies.chrono] 28[dependencies.chrono]
29version = "0.4" 29version = "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};
12use crate::utils::{load_configuration_file, AppConfig}; 12use crate::utils::{load_configuration_file, AppConfig};
13 13
14use clap::{App as ClapApp, Arg}; 14use clap::{App as ClapApp, Arg};
15use cursive::termion; 15use cursive::crossterm;
16use cursive::views::{LinearLayout, NamedView}; 16use cursive::views::{LinearLayout, NamedView};
17use lazy_static::lazy_static; 17use 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",