diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5c3e6f9..2c07d9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,9 +37,9 @@ jobs: run: | sudo apt-get update \ && sudo apt-get install -y \ - libdbus-1-dev + libdbus-1-dev libncurses5-dev libncursesw5-dev - name: Build - run: cargo build -all --no-default-features --features unix --release && strip target/release/dijo + run: cargo build --release && strip target/release/dijo - name: Upload binaries to release uses: svenstaro/upload-release-action@v1-release @@ -72,7 +72,7 @@ jobs: override: true - name: Build for mac - run: cargo build --all --no-default-features --features unix --release && strip target/release/dijo + run: cargo build --release && strip target/release/dijo - name: Upload binaries to release uses: svenstaro/upload-release-action@v1-release @@ -105,15 +105,14 @@ jobs: override: true - name: Build for windows - run: | - cargo build --all --no-default-features --features windows --release - strip target/release/dijo + shell: bash + run: cargo build --release - name: Upload binaries to release uses: svenstaro/upload-release-action@v1-release with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: target/release/dijo - asset_name: dijo-x86_64-windows + file: target/release/dijo.exe + asset_name: dijo-x86_64-windows.exe tag: ${{ github.ref }} overwrite: true 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(