diff options
-rw-r--r-- | .github/workflows/main.yml | 15 | ||||
-rw-r--r-- | src/app/impl_self.rs | 3 | ||||
-rw-r--r-- | src/main.rs | 14 |
3 files changed, 11 insertions, 21 deletions
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: | |||
37 | run: | | 37 | run: | |
38 | sudo apt-get update \ | 38 | sudo apt-get update \ |
39 | && sudo apt-get install -y \ | 39 | && sudo apt-get install -y \ |
40 | libdbus-1-dev | 40 | libdbus-1-dev libncurses5-dev libncursesw5-dev |
41 | - name: Build | 41 | - name: Build |
42 | run: cargo build -all --no-default-features --features unix --release && strip target/release/dijo | 42 | run: cargo build --release && strip target/release/dijo |
43 | 43 | ||
44 | - name: Upload binaries to release | 44 | - name: Upload binaries to release |
45 | uses: svenstaro/upload-release-action@v1-release | 45 | uses: svenstaro/upload-release-action@v1-release |
@@ -72,7 +72,7 @@ jobs: | |||
72 | override: true | 72 | override: true |
73 | 73 | ||
74 | - name: Build for mac | 74 | - name: Build for mac |
75 | run: cargo build --all --no-default-features --features unix --release && strip target/release/dijo | 75 | run: cargo build --release && strip target/release/dijo |
76 | 76 | ||
77 | - name: Upload binaries to release | 77 | - name: Upload binaries to release |
78 | uses: svenstaro/upload-release-action@v1-release | 78 | uses: svenstaro/upload-release-action@v1-release |
@@ -105,15 +105,14 @@ jobs: | |||
105 | override: true | 105 | override: true |
106 | 106 | ||
107 | - name: Build for windows | 107 | - name: Build for windows |
108 | run: | | 108 | shell: bash |
109 | cargo build --all --no-default-features --features windows --release | 109 | run: cargo build --release |
110 | strip target/release/dijo | ||
111 | 110 | ||
112 | - name: Upload binaries to release | 111 | - name: Upload binaries to release |
113 | uses: svenstaro/upload-release-action@v1-release | 112 | uses: svenstaro/upload-release-action@v1-release |
114 | with: | 113 | with: |
115 | repo_token: ${{ secrets.GITHUB_TOKEN }} | 114 | repo_token: ${{ secrets.GITHUB_TOKEN }} |
116 | file: target/release/dijo | 115 | file: target/release/dijo.exe |
117 | asset_name: dijo-x86_64-windows | 116 | asset_name: dijo-x86_64-windows.exe |
118 | tag: ${{ github.ref }} | 117 | tag: ${{ github.ref }} |
119 | overwrite: true | 118 | 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 { | |||
251 | "mnext" | "month-next" => "month-next (alias: mnext)", | 251 | "mnext" | "month-next" => "month-next (alias: mnext)", |
252 | "tup" | "track-up" => "track-up <auto-habit-name> (alias: tup)", | 252 | "tup" | "track-up" => "track-up <auto-habit-name> (alias: tup)", |
253 | "tdown" | "track-down" => "track-down <auto-habit-name> (alias: tdown)", | 253 | "tdown" | "track-down" => "track-down <auto-habit-name> (alias: tdown)", |
254 | "q" | "quit" => "quit", | 254 | "q" | "quit" => "quit dijo", |
255 | "w" | "write" => "write current state to disk (alias: w)", | ||
255 | "h"|"?" | "help" => "help [<command>|commands|keys] (aliases: h, ?)", | 256 | "h"|"?" | "help" => "help [<command>|commands|keys] (aliases: h, ?)", |
256 | "cmds" | "commands" => "add, add-auto, delete, month-{prev,next}, track-{up,down}, help, quit", | 257 | "cmds" | "commands" => "add, add-auto, delete, month-{prev,next}, track-{up,down}, help, quit", |
257 | "keys" => "TODO", // TODO (view?) | 258 | "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}; | |||
12 | use crate::utils::{load_configuration_file, AppConfig}; | 12 | use crate::utils::{load_configuration_file, AppConfig}; |
13 | 13 | ||
14 | use clap::{App as ClapApp, Arg}; | 14 | use clap::{App as ClapApp, Arg}; |
15 | 15 | use cursive::pancurses; | |
16 | #[cfg(any(target_os = "linux", target_os = "macos"))] | ||
17 | use cursive::termion; | ||
18 | |||
19 | #[cfg(target_os = "windows")] | ||
20 | use cursive::crossterm; | ||
21 | |||
22 | use cursive::views::{LinearLayout, NamedView}; | 16 | use cursive::views::{LinearLayout, NamedView}; |
23 | use lazy_static::lazy_static; | 17 | use lazy_static::lazy_static; |
24 | 18 | ||
@@ -68,11 +62,7 @@ fn main() { | |||
68 | println!("{}", h); | 62 | println!("{}", h); |
69 | } | 63 | } |
70 | } else { | 64 | } else { |
71 | #[cfg(target_os = "windows")] | 65 | let mut s = pancurses().unwrap(); |
72 | let mut s = crossterm().unwrap(); | ||
73 | |||
74 | #[cfg(any(target_os = "linux", target_os = "macos"))] | ||
75 | let mut s = termion().unwrap(); | ||
76 | 66 | ||
77 | let app = App::load_state(); | 67 | let app = App::load_state(); |
78 | let layout = NamedView::new( | 68 | let layout = NamedView::new( |