Fanagle with tui. Going to probably put this on halt until tui-rs pushes a new stable release...

This commit is contained in:
ClementTsang 2019-11-05 16:33:57 -05:00
parent 94bf570b87
commit ff595cd028
4 changed files with 25 additions and 20 deletions

View file

@ -17,7 +17,7 @@ path = "src/main.rs"
[dependencies]
chrono = "0.4.9"
clap = "2.33.0"
crossterm = "0.11.0"
crossterm = "^0.10"
failure = "0.1.5"
futures-preview = "0.3.0-alpha.18"
fern = "0.5"
@ -34,8 +34,8 @@ winapi = "0.3.8"
[dependencies.tui-temp-fork]
#git = "https://github.com/ClementTsang/tui-rs"
#path = "../tui-rs"
version = "0.6.4"
path = "../tui-rs"
version = "0.6"
default-features = false
features = ['crossterm']

14
TODO.md
View file

@ -1,21 +1,19 @@
# To-Do List
Note this will probably migrate to GitHub's native Issues; this was mostly for personal use during early stages.
## Want to do
- Bug for too small windows --- probably a TUI bug?
- Scaling in and out (zoom), may need to show zoom levels
- More keybinds (jumping, scaling)
- Filtering in processes (that is, allow searching)
- More keybinds (jumping in scrolling (vim bindings?), scaling)
- ~~Add custom error because it's really messy~~ Done, but need to implement across rest of app!
- Efficiency... for example, reduce some redraw logic if possible (ie: no changes to dir sorting)
- Filtering in processes (that is, allow searching)
- Probably good to add a "are you sure" to dd-ing...
## Less important
- Minimalist mode
@ -35,3 +33,5 @@ Note this will probably migrate to GitHub's native Issues; this was mostly for p
- Grouping by process
- Deal with async and stuff (remove if not needed)
- Perhaps switch libraries...?

View file

@ -269,7 +269,7 @@ pub fn draw_data<B : backend::Backend>(terminal : &mut Terminal<B>, app_state :
}),
)
.header_style(Style::default().fg(Color::LightBlue))
.widths(&[(width * 0.45) as u16, (width * 0.4) as u16])
.widths(&[Constraint::Length((width * 0.45) as u16), Constraint::Length((width * 0.4) as u16)])
.render(&mut f, middle_divided_chunk_2[0]);
}
@ -316,13 +316,13 @@ pub fn draw_data<B : backend::Backend>(terminal : &mut Terminal<B>, app_state :
)
.header_style(Style::default().fg(Color::LightBlue).modifier(Modifier::BOLD))
.widths(&[
(width * 0.18).floor() as u16,
(width * 0.14).floor() as u16,
(width * 0.11).floor() as u16,
(width * 0.11).floor() as u16,
(width * 0.11).floor() as u16,
(width * 0.11).floor() as u16,
(width * 0.11).floor() as u16,
Constraint::Length((width * 0.18).floor() as u16),
Constraint::Length((width * 0.14).floor() as u16),
Constraint::Length((width * 0.11).floor() as u16),
Constraint::Length((width * 0.11).floor() as u16),
Constraint::Length((width * 0.11).floor() as u16),
Constraint::Length((width * 0.11).floor() as u16),
Constraint::Length((width * 0.11).floor() as u16),
])
.render(&mut f, middle_divided_chunk_2[1]);
}
@ -435,7 +435,12 @@ pub fn draw_data<B : backend::Backend>(terminal : &mut Terminal<B>, app_state :
}),
)
.header_style(Style::default().fg(Color::LightBlue))
.widths(&[(width * 0.2) as u16, (width * 0.35) as u16, (width * 0.2) as u16, (width * 0.2) as u16])
.widths(&[
Constraint::Length((width * 0.2) as u16),
Constraint::Length((width * 0.35) as u16),
Constraint::Length((width * 0.2) as u16),
Constraint::Length((width * 0.2) as u16),
])
.render(&mut f, bottom_chunks[1]);
}
}

View file

@ -229,7 +229,7 @@ fn main() -> error::Result<()> {
KeyEvent::ShiftUp => app.decrement_position_count(),
KeyEvent::ShiftDown => app.increment_position_count(),
KeyEvent::Char(c) => app.on_key(c),
KeyEvent::Enter => app.on_enter(),
//KeyEvent::Enter => app.on_enter(),
KeyEvent::Esc => app.on_esc(),
_ => {}
}