From 5c13cecaec4ce4c0e4f79c781cd9c90301bf82ad Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 24 Jul 2020 10:56:58 +0530 Subject: switch to pancurses backend --- src/app/impl_self.rs | 3 ++- src/main.rs | 14 ++------------ 2 files changed, 4 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/app/impl_self.rs b/src/app/impl_self.rs index a806dc5..39882be 100644 --- a/src/app/impl_self.rs +++ b/src/app/impl_self.rs @@ -251,7 +251,8 @@ impl App { "mnext" | "month-next" => "month-next (alias: mnext)", "tup" | "track-up" => "track-up (alias: tup)", "tdown" | "track-down" => "track-down (alias: tdown)", - "q" | "quit" => "quit", + "q" | "quit" => "quit dijo", + "w" | "write" => "write current state to disk (alias: w)", "h"|"?" | "help" => "help [|commands|keys] (aliases: h, ?)", "cmds" | "commands" => "add, add-auto, delete, month-{prev,next}, track-{up,down}, help, quit", "keys" => "TODO", // TODO (view?) diff --git a/src/main.rs b/src/main.rs index 609738e..84fd8ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,13 +12,7 @@ use crate::command::{open_command_window, Command}; use crate::utils::{load_configuration_file, AppConfig}; use clap::{App as ClapApp, Arg}; - -#[cfg(any(target_os = "linux", target_os = "macos"))] -use cursive::termion; - -#[cfg(target_os = "windows")] -use cursive::crossterm; - +use cursive::pancurses; use cursive::views::{LinearLayout, NamedView}; use lazy_static::lazy_static; @@ -68,11 +62,7 @@ fn main() { println!("{}", h); } } else { - #[cfg(target_os = "windows")] - let mut s = crossterm().unwrap(); - - #[cfg(any(target_os = "linux", target_os = "macos"))] - let mut s = termion().unwrap(); + let mut s = pancurses().unwrap(); let app = App::load_state(); let layout = NamedView::new( -- cgit v1.2.3