aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-07-20 07:08:20 +0100
committerAkshay <[email protected]>2020-07-20 07:08:20 +0100
commit5dd90a7808c2a1ed8f7ba901765d2e42858b2192 (patch)
tree9148204681c6e66e59418b579a1849ce094834d8
parenta110cc018cd40488871bae025d11ef4ae59e9e60 (diff)
switch to crossterm backend
-rw-r--r--Cargo.lock160
-rw-r--r--Cargo.toml2
-rw-r--r--src/main.rs4
3 files changed, 132 insertions, 34 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 63d34ea..6ff6a8a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -131,6 +131,15 @@ dependencies = [
131] 131]
132 132
133[[package]] 133[[package]]
134name = "cloudabi"
135version = "0.0.3"
136source = "registry+https://github.com/rust-lang/crates.io-index"
137checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
138dependencies = [
139 "bitflags",
140]
141
142[[package]]
134name = "const-random" 143name = "const-random"
135version = "0.1.8" 144version = "0.1.8"
136source = "registry+https://github.com/rust-lang/crates.io-index" 145source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -178,6 +187,31 @@ dependencies = [
178] 187]
179 188
180[[package]] 189[[package]]
190name = "crossterm"
191version = "0.17.7"
192source = "registry+https://github.com/rust-lang/crates.io-index"
193checksum = "6f4919d60f26ae233e14233cc39746c8c8bb8cd7b05840ace83604917b51b6c7"
194dependencies = [
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]]
206name = "crossterm_winapi"
207version = "0.6.1"
208source = "registry+https://github.com/rust-lang/crates.io-index"
209checksum = "057b7146d02fb50175fd7dbe5158f6097f33d02831f43b4ee8ae4ddf67b68f5c"
210dependencies = [
211 "winapi 0.3.9",
212]
213
214[[package]]
181name = "ctor" 215name = "ctor"
182version = "0.1.15" 216version = "0.1.15"
183source = "registry+https://github.com/rust-lang/crates.io-index" 217source = "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"
531checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" 565checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9"
532 566
533[[package]] 567[[package]]
568name = "lock_api"
569version = "0.3.4"
570source = "registry+https://github.com/rust-lang/crates.io-index"
571checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75"
572dependencies = [
573 "scopeguard",
574]
575
576[[package]]
534name = "log" 577name = "log"
535version = "0.4.11" 578version = "0.4.11"
536source = "registry+https://github.com/rust-lang/crates.io-index" 579source = "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]]
617name = "mio"
618version = "0.7.0"
619source = "registry+https://github.com/rust-lang/crates.io-index"
620checksum = "6e9971bc8349a361217a8f2a41f5d011274686bd4436465ba51730921039d7fb"
621dependencies = [
622 "lazy_static",
623 "libc",
624 "log",
625 "miow 0.3.5",
626 "ntapi",
627 "winapi 0.3.9",
628]
629
630[[package]]
574name = "mio-extras" 631name = "mio-extras"
575version = "2.0.6" 632version = "2.0.6"
576source = "registry+https://github.com/rust-lang/crates.io-index" 633source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -578,7 +635,7 @@ checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
578dependencies = [ 635dependencies = [
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]]
655name = "miow"
656version = "0.3.5"
657source = "registry+https://github.com/rust-lang/crates.io-index"
658checksum = "07b88fb9795d4d36d62a012dfbf49a8f5cf12751f36d31a9dbe66d528e58979e"
659dependencies = [
660 "socket2",
661 "winapi 0.3.9",
662]
663
664[[package]]
598name = "ncurses" 665name = "ncurses"
599version = "5.99.0" 666version = "5.99.0"
600source = "registry+https://github.com/rust-lang/crates.io-index" 667source = "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]]
705name = "ntapi"
706version = "0.3.4"
707source = "registry+https://github.com/rust-lang/crates.io-index"
708checksum = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2"
709dependencies = [
710 "winapi 0.3.9",
711]
712
713[[package]]
638name = "num" 714name = "num"
639version = "0.3.0" 715version = "0.3.0"
640source = "registry+https://github.com/rust-lang/crates.io-index" 716source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -698,12 +774,6 @@ dependencies = [
698] 774]
699 775
700[[package]] 776[[package]]
701name = "numtoa"
702version = "0.1.0"
703source = "registry+https://github.com/rust-lang/crates.io-index"
704checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef"
705
706[[package]]
707name = "owning_ref" 777name = "owning_ref"
708version = "0.4.1" 778version = "0.4.1"
709source = "registry+https://github.com/rust-lang/crates.io-index" 779source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -713,6 +783,30 @@ dependencies = [
713] 783]
714 784
715[[package]] 785[[package]]
786name = "parking_lot"
787version = "0.10.2"
788source = "registry+https://github.com/rust-lang/crates.io-index"
789checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e"
790dependencies = [
791 "lock_api",
792 "parking_lot_core",
793]
794
795[[package]]
796name = "parking_lot_core"
797version = "0.7.2"
798source = "registry+https://github.com/rust-lang/crates.io-index"
799checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"
800dependencies = [
801 "cfg-if",
802 "cloudabi",
803 "libc",
804 "redox_syscall",
805 "smallvec",
806 "winapi 0.3.9",
807]
808
809[[package]]
716name = "pkg-config" 810name = "pkg-config"
717version = "0.3.18" 811version = "0.3.18"
718source = "registry+https://github.com/rust-lang/crates.io-index" 812source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -749,15 +843,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
749checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" 843checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
750 844
751[[package]] 845[[package]]
752name = "redox_termios"
753version = "0.1.1"
754source = "registry+https://github.com/rust-lang/crates.io-index"
755checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
756dependencies = [
757 "redox_syscall",
758]
759
760[[package]]
761name = "redox_users" 846name = "redox_users"
762version = "0.3.4" 847version = "0.3.4"
763source = "registry+https://github.com/rust-lang/crates.io-index" 848source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -796,6 +881,12 @@ dependencies = [
796] 881]
797 882
798[[package]] 883[[package]]
884name = "scopeguard"
885version = "1.1.0"
886source = "registry+https://github.com/rust-lang/crates.io-index"
887checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
888
889[[package]]
799name = "serde" 890name = "serde"
800version = "1.0.114" 891version = "1.0.114"
801source = "registry+https://github.com/rust-lang/crates.io-index" 892source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -833,6 +924,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
833checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" 924checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed"
834dependencies = [ 925dependencies = [
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"
853checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 945checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
854 946
855[[package]] 947[[package]]
948name = "smallvec"
949version = "1.4.1"
950source = "registry+https://github.com/rust-lang/crates.io-index"
951checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f"
952
953[[package]]
954name = "socket2"
955version = "0.3.12"
956source = "registry+https://github.com/rust-lang/crates.io-index"
957checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"
958dependencies = [
959 "cfg-if",
960 "libc",
961 "redox_syscall",
962 "winapi 0.3.9",
963]
964
965[[package]]
856name = "stable_deref_trait" 966name = "stable_deref_trait"
857version = "1.2.0" 967version = "1.2.0"
858source = "registry+https://github.com/rust-lang/crates.io-index" 968source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -892,18 +1002,6 @@ dependencies = [
892] 1002]
893 1003
894[[package]] 1004[[package]]
895name = "termion"
896version = "1.5.5"
897source = "registry+https://github.com/rust-lang/crates.io-index"
898checksum = "c22cec9d8978d906be5ac94bceb5a010d885c626c4c8855721a4dbd20e3ac905"
899dependencies = [
900 "libc",
901 "numtoa",
902 "redox_syscall",
903 "redox_termios",
904]
905
906[[package]]
907name = "textwrap" 1005name = "textwrap"
908version = "0.11.0" 1006version = "0.11.0"
909source = "registry+https://github.com/rust-lang/crates.io-index" 1007source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 0240b65..7659d9a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ notify = "4.0"
22 22
23[dependencies.cursive] 23[dependencies.cursive]
24version = "0.15" 24version = "0.15"
25features = ["termion-backend"] 25features = ["crossterm-backend"]
26 26
27[dependencies.chrono] 27[dependencies.chrono]
28version = "0.4" 28version = "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};
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
@@ -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",