Skip to content

Commit

Permalink
switch to pancurses backend
Browse files Browse the repository at this point in the history
  • Loading branch information
oppiliappan committed Jul 24, 2020
1 parent bf98997 commit 5c13cec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion src/app/impl_self.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ impl App {
"mnext" | "month-next" => "month-next (alias: mnext)",
"tup" | "track-up" => "track-up <auto-habit-name> (alias: tup)",
"tdown" | "track-down" => "track-down <auto-habit-name> (alias: tdown)",
"q" | "quit" => "quit",
"q" | "quit" => "quit dijo",
"w" | "write" => "write current state to disk (alias: w)",
"h"|"?" | "help" => "help [<command>|commands|keys] (aliases: h, ?)",
"cmds" | "commands" => "add, add-auto, delete, month-{prev,next}, track-{up,down}, help, quit",
"keys" => "TODO", // TODO (view?)
Expand Down
14 changes: 2 additions & 12 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 5c13cec

Please sign in to comment.