aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-08-04 07:47:09 +0100
committerAkshay <[email protected]>2020-08-04 07:47:09 +0100
commit403d114d8296fe37dbdb509449a2fee2badb8d37 (patch)
tree05bb0d1cc7aced39fed3049c30221e30281698c4 /src
parent807f945a08e0ff28968194c098a0a05a6a79ba09 (diff)
add feature to compile on windows, switch to termion
Diffstat (limited to 'src')
-rw-r--r--src/main.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 84fd8ee..56c521d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -12,7 +12,13 @@ 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::pancurses; 15
16#[cfg(any(feature = "termion-backend", feature = "default"))]
17use cursive::termion;
18
19#[cfg(feature = "crossterm-backend")]
20use cursive::crossterm;
21
16use cursive::views::{LinearLayout, NamedView}; 22use cursive::views::{LinearLayout, NamedView};
17use lazy_static::lazy_static; 23use lazy_static::lazy_static;
18 24
@@ -62,7 +68,11 @@ fn main() {
62 println!("{}", h); 68 println!("{}", h);
63 } 69 }
64 } else { 70 } else {
65 let mut s = pancurses().unwrap(); 71 #[cfg(any(feature = "termion-backend", feature = "default"))]
72 let mut s = termion().unwrap();
73
74 #[cfg(feature = "crossterm-backend")]
75 let mut s = crossterm().unwrap();
66 76
67 let app = App::load_state(); 77 let app = App::load_state();
68 let layout = NamedView::new( 78 let layout = NamedView::new(